The three virtues of a programmer: Laziness, Impatience, and Hubris. – Larry Wall

Legacy:VitalOverdose/StationaryGunners

From Unreal Wiki, The Unreal Engine Documentation Site
< Legacy:VitalOverdose
Revision as of 11:47, 28 February 2006 by 84-45-226-149.no-dns-yet.enta.net (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
UT2004 :: Actor >> Pawn >> vehicle>>Svehicle>>ONSVehicle StationaryGunners (Package: custom)

so far just 1 single property for this class its basically a x zoom for the alt fire when in the gunner.

var() float           xZoom;

function AltFire(optional float F)[edit]

just overwriting a single function here, all i have doe is swapped the original function ToggleZoom() for ToggleZoomWithMax(xZoom) which i found already in the game code.


function AltFire(optional float F)
{
if (PlayerController(Controller) != None) 
   {
    bWeaponIsAltFiring = true;
    PC.ToggleZoomWithMax(xZoom);
   }
}

DefaultProperties[edit]

Here in default properties is where most of the work is done in putting the gunner together. I'm using 3 weapons as its 2 manned ONSMASRocketPack of the onsmas and ONSPRVRearGunPawn off the ONSPrv (hellbender). The body of the turret has been borrowed from the Assault gametype with a drifferent texture applied to it.

DefaultProperties
{
Mesh=SkeletalMesh'AS_Vehicles_M.FloorTurretBase'
DriverWeapons(0)=(WeaponClass=Class'mylevel.ONSMASRocketPack')
PassengerWeapons(0)=(WeaponPawnClass=Class'Onslaught.ONSPRVRearGunPawn')
 
Begin Object Class=KarmaParamsRBFull Name=KParams0
   KCOMOffset=(X=-0.250000)
   KLinearDamping=0.000000
   KAngularDamping=0.000000
   KStartEnabled=True
   bKNonSphericalInertia=True
   KActorGravScale=1
   bHighDetailOnly=False
   bClientOnly=False
   bKDoubleTickRate=True
   bKStayUpright=false
   bKAllowRotate=True
   bDestroyOnWorldPenetrate=True
   bDoSafetime=True
   KFriction=0.500000
   KImpactThreshold=300.000000
End Object
 
KParams=KarmaParamsRBFull'mylevel.FatalsStationaryGunners.KParams0'
}

full script[edit]

here is the completed script for now. I will definitely be making some changes /improvements to it at a later date

//-----------------------------------------------------------
// Gunners By Vitaloverdose http://www.vitaloverdose.com march 2006
// Part of the 'Vitals Pro Mapping tools' mod for ut2004
// full actor list at http://wiki.beyondunreal.com/wiki/Vital's_Pro_Mapping_Tools
// Direct download the mod in zipped file http://ProMappingTools.zapto.org
// A custom stationary gunner class with variable zoom.
//-----------------------------------------------------------
 
class Gunners extends ONSvehicle;
 
var() float           xZoom;
 
function AltFire(optional float F)
{
if (PlayerController(Controller) != None) 
   {
    bWeaponIsAltFiring = true;
    PC.ToggleZoomWithMax(xZoom);
   }
}
 
DefaultProperties
{
Mesh=SkeletalMesh'AS_Vehicles_M.FloorTurretBase'
DriverWeapons(0)=(WeaponClass=Class'mylevel.ONSMASRocketPack')
PassengerWeapons(0)=(WeaponPawnClass=Class'Onslaught.ONSPRVRearGunPawn')
 
Begin Object Class=KarmaParamsRBFull Name=KParams0
   KCOMOffset=(X=-0.250000)
   KLinearDamping=0.000000
   KAngularDamping=0.000000
   KStartEnabled=True
   bKNonSphericalInertia=True
   KActorGravScale=0
   bHighDetailOnly=False
   bClientOnly=False
   bKDoubleTickRate=True
   bKStayUpright=false
   bKAllowRotate=True
   bDestroyOnWorldPenetrate=True
   bDoSafetime=True
   KFriction=0.500000
   KImpactThreshold=300.000000
End Object
 
KParams=KarmaParamsRBFull'mylevel.FatalsStationaryGunners.KParams0'
}