Always snap to grid
Legacy:ONSVehicle
This is the base class for Onslaught vehicles in UT2004 and a subclass of the StaticMesh vehicle class SVehicle.
Contents
- 1 Properties
- 2 Default Properties
- 3 Functions
- 4 Events
- 5 States
- 6 Known Subclasses
- 7 Related Topics
- 8 Discussion
Properties[edit]
Weapons[edit]
Structs[edit]
DriverWeaponStruct holds the class of weapon the driver may use and the bone to attach the weapon to.
struct native export DriverWeaponStruct { var() class<ONSWeapon> WeaponClass< SEMI > var() name WeaponBone; };
PassengerWeaponStruct holds the class of weapon the passenger may use and the bone to attach the weapon to.
struct native export PassengerWeaponStruct { var() class<ONSWeaponPawn> WeaponPawnClass< SEMI > var() name WeaponBone; };
SVehicle[edit]
- array<DriverWeaponStruct> DriverWeapons
- Because each element applies only to the driver, it enables the driver to use multiple weapons in a single vehicle. This can be seen with the ONSMobileAssaultStation (that cannon is actually two completely separate weapons, unrelated to firing modes).
- array<PassengerWeaponStruct> PassengerWeapons
- Each passenger can control one weapon. This can be seen with the ONSMobileAssaultStation (one weaponpawn per passenger).
Hidden[edit]
- array<ONSWeapon> Weapons
- Only applies to the driver.
- array<ONSWeaponPawn> WeaponPawns
- Only applies to passengers.
- byte ActiveWeapon
- The element index in the Weapons property array. This defines the driver's currently selected weapon.
- rotator CustomAim
- A modification of direction, used for weapon aiming. This is used primarily to "lead the target" in non-instantfire weapons.
- bool bHasAltFire
- Controls whether AltFire events are passed to any ONSWeapons the vehicle is using. It is only set to false for vehicles that have special AltFires inside the vehicle itself, for example the Scorpion (ONSRV) and Manta (ONSHoverBike).
Team Status[edit]
These properties are available to edit.
- Material RedSkin
- Material used when assigned to the Red Team.
- Material BlueSkin
- Material used when assigned to the Blue Team.
Sound[edit]
These properties are available to edit.
- Sound IdleSound
- Heard when occupied by a driver, but not moving.
- Sound StartUpSound
- Heard when an empty vehicle is driven.
- Sound ShutDownSound
- Heard when the driver has exited.
Force Feedback[edit]
Although these properties are available to edit, it's best not to change these.
- string StartUpForce
- The force played when the player gets in.
- string ShutDownForce
- The force played when the player get out.
Vehicle Proximity Viewshake[edit]
Main[edit]
- float ViewShakeRadius
- Distance from the vehicle's origin that view starts to shake. This is the attenuation radius of the vehicle's ViewShake.
- rotator ViewShakeRotMag
- Magnitude (Amplitude) of rotation.
- float ViewShakeRotFreq
- Frequency (Rate) of rotation.
- vector ViewShakeOffsetMag
- Magnitude (Amplitude) of offset.
- float ViewShakeOffsetFreq
- Frequency (Rate) of offset.
Hidden[edit]
- float ViewShakeLastCheck
Damage and Destruction[edit]
Main[edit]
- StaticMesh DestroyedVehicleMesh
- The destroyed version mesh of the vehicle.
- class<Emitter> DestructionEffectClass
- Emitter effect to spawn, when the vehicle is destroyed.
- class<Emitter> DisintegrationEffectClass
- Emitter effect to spawn, when the vehicle is destroyed.
- float DisintegrationHealth
- Health of destructed mesh before it is blown up and completely removed, aka disintegrated.
- range DestructionLinearMomentum
- Speed of movement momentum
- range DestructionAngularMomentum
- Speed of rotational momentum
- float TimeBetweenImpactExplosions
- While destroyed, specify the maximum amount of time after an explosion b4 another can occur?
- array<sound> ExplosionSounds
- An array of sounds used for the explosions, when destroyed.
- float ExplosionSoundVolume
- Volume at which to play "ExplosionSounds".
- float ExplosionSoundRadius
- Sound radius of "ExplosionSounds".
- class<ONSDamagedEffect> DamagedEffectClass
- float DamagedEffectScale
- vector DamagedEffectOffset
- float DamagedEffectHealthSmokeFactor
- Proportion of default health before it starts smoking.
- float DamagedEffectHealthFireFactor
- Proportion of default health before it starts burning.
- float DamagedEffectAccScale
- float DamagedEffectFireDamagePerSec
Hidden[edit]
- byte ExplosionCount
- byte OldExplosionCount
- float LastVelocitySize
- float LastImpactExplosionTime
- float LastCheckUpsideDownTime
- float UpsideDownDamage
- float ExplosionDamage
- float ExplosionRadius
- float ExplosionMomentum
- class<DamageType> ExplosionDamageType
- class<DamageType> DestroyedRoadKillDamageType
- DamageType for when vehicle runs over/crushes someone after being destroyed.
- float DamagedEffectAccuredDamage
- ONSDamagedEffect DamagedEffect
Flags[edit]
Main[edit]
- bool bEnableProximityViewShake
- bool bOnlyViewShakeIfDriven
- vector FireImpulse
- vector AltFireImpulse
Hidden[edit]
- bool bDestroyAppearance
- bool bDisintegrateVehicle
- bool bHadFire
- bool bSoundsPrecached
- bool bNeverReset
- bool bEjectPassengersWhenFlipped
- bool bDriverCannotLeaveVehicle
- bool bCannotBeBased
- bool bHasFireImpulse
- bool bHasAltFireImpulse
- bool bCustomAiming
- Whether this vehicle's aiming will be modified.
- bool bIsAwake (const)
- Used for Replication.
- bool bHasBeenAwake (const)
- bool bAltFocalPoint
- Used by the AI. This overrides the AI's focal point.
- bool AltFocalPoint
Explosion Camera Shakes[edit]
These properties are available to edit.
- vector ShakeRotMag
- How far to rotate the view.
- vector ShakeRotRate
- How fast to rotate the view.
- float ShakeRotTime
- How much time to shake the view rotation. (or how long before rotational shake completely falls off)
- vector ShakeOffsetMag
- Maximum view offset (vertically).
- vector ShakeOffsetRate
- Maximum vertical offset the view.
- float ShakeOffsetTime
- How much time to offset the view.
Impact[edit]
Main[edit]
- float ImpactDamageTics
- flost ImpactDamageThreshold
- float PImpactDamageMult
- array<Sound> ImpactDamageSounds
Hidden[edit]
- struct ImpactInfoStruct (native, export)
- Holds the information for a single impact.
- Actor ImpactInfoStruct.Other
- vector ImpactInfoStruct.Pos
- vector ImpactInfoStruct.ImpactVel
- vector ImpactInfoStruct.ImpactNorm
- vector ImpactInfoStruct.ImpactAccel
- ImpactInfoStruct ImpactInfo
- int ImpactTicksLeft
Sparks[edit]
These properties are available to edit.
- class<ONSImpactSparks> SparkEffectClass
- ONSImpactSparks SparkEffect (editinline)
- float SparkAdvanceFactor
Headlights[edit]
Main[edit]
- array<vector> HeadlightCronaOffset
- One array element for each headlight.
- Material HeadlightCronaMaterial
- A single material for all headlights.
- float HeadlightCronaMaxSize
- One size for all headlights.
- Material HeadlightProjectorMaterial
- vector HeadlightProjectorOffset
- rotator HeadlightProjectorRotation
- float HeadlightProjectorScale
Hidden[edit]
- array<ONSHeadlightCorna> HeadlightCorona
- One array element for each Headlight.
- ONSHeadlightProjector HeadlightProjector
Debugging[edit]
This property is hidden.
- string DebugInfo
AI[edit]
These properties are hidden.
- Sound LockedOnSound
- The sound that will indicate this vehicle is locked onto.
- float ResetTime
- If this vehicle has no driver, CheckReset() will be called at this time.
- float LastRunOverWarningTime
- Last time checked for pawns in front of vehicle and warned them of their impending doom.
- float MinRunOverWarningAim
- Bot Reservation
- Bot that's about to get in this vehicle.
- int OldYaw
Correct Aim Indicator (Crosshair Modification)[edit]
These properties are hidden.
- color CrosshairColor (config)
- float CrosshairX, CrosshairY (config)
- Texture CrosshairTexture (config)
Default Properties[edit]
// Miscellaneous bHasAltFire = True ViewShakeRadius = 100 DisintegrationHealth = -50 DestructionAngularMomentum = (Min=50, Max=50) // Explosions TimeBetweenImpactExplosions = 0.1 ExplosionSounds(0) = Sound'ONSVehicleSounds-S.Explosions.VehicleExplosion01' ExplosionSounds(1) = Sound'ONSVehicleSounds-S.Explosions.VehicleExplosion02' ExplosionSounds(2) = Sound'ONSVehicleSounds-S.Explosions.VehicleExplosion03' ExplosionSounds(3) = Sound'ONSVehicleSounds-S.Explosions.VehicleExplosion04' ExplosionSounds(4) = Sound'ONSVehicleSounds-S.Explosions.VehicleExplosion05' ExplosionSoundVolume = 5 ExplosionSoundRadius = 200 ExplosionDamage = 100 ExplosionRadius = 300 ExplosionMomentum = 6000 ExplosionDamageType = Class'Onslaught.DamTypeOnsVehicleExplosion' // Road Kill DestroyedRoadKillDamageType = Class'Onslaught.DamTypeONSVehicleRoadKill' // Damage Effects DamagedEffectClass = Class'Onslaught.ONSDamagedEffect' DamagedEffectScale = 1 DamagedEffectHealthSmokeFactor = 0.5 DamagedEffectHealthFireFactor = 0.25 DamagedEffectAccScale = 0.25 DamagedEffectFireDamagePerSec = 0.75 // Viewshake bOnlyViewShakeIfDriven = True // Ejection bEjectPassengersWhenFlipped = True // Viewshake ShakeRotMag = (Z=250) ShakeRotRate = (Z=2500) ShakeRotTime = 6 ShakeOffsetMag = (Z=10) ShakeOffsetRate = (Z=200) ShakeOffsetTime = 10 // Impact ImpactDamageTicks = 10 ImpactDamageThreshold = 5000 ImpactDamageMult = 0.0003 ImpactDamageSounds(0) = Sound'ONSVehicleSounds-S.CollisionSounds.VehicleCollision01' ImpactDamageSounds(1) = Sound'ONSVehicleSounds-S.CollisionSounds.VehicleCollision02' ImpactDamageSounds(2) = Sound'ONSVehicleSounds-S.CollisionSounds.VehicleCollision03' ImpactDamageSounds(3) = Sound'ONSVehicleSounds-S.CollisionSounds.VehicleCollision04' ImpactDamageSounds(4) = Sound'ONSVehicleSounds-S.CollisionSounds.VehicleCollision05' ImpactDamageSounds(5) = Sound'ONSVehicleSounds-S.CollisionSounds.VehicleCollision06' ImpactDamageSounds(6) = Sound'ONSVehicleSounds-S.CollisionSounds.VehicleCollision07' SparkEffectClass = Class'Onslaught.ONSImpactSparks' SparkAdvanceFactor = 1.5 LockedOnSound = Sound'WeaponSounds.BaseGunTech.BSeekLost1' MinRunOverWarningAim = 0.88 // Crosshair CrossHairColor = (G=255, A=255) CrosshairX = 32 CrosshairY = 32 CrosshairTexture = Texture'ONSInterface-TX.tankBarrelAligned' bZeroPCRotOnEntry = False // Vehicle Lock bTeamLocked = True bEnterringUnlocks = True // Team Team = 0; TeamBeaconTexture = Texture'ONSInterface-TX.HealthBar' NoEntryTexture = Texture'HUDContent/Generic.NoEntry' TeamBeaconBorderMaterial = Texture'InterfaceContent.Menu.BorderBoxD' // RanOver / Crushed RanOverDamageType = Class'Onslaught.DamTypeRoadkill' CrushedDamageType = Class'Onslaught.DamTypePancake' RanOverSound = Sound'ONSVehicleSounds-S.CarAlarm.CarAlarm01' // Stolen StolenAnnouncement = “Hijacked” StolenSound = Sound'ONSVehicleSounds-S.CarAlarm.CarAlarm01' // Bullet Sounds BulletSounds(0) = Sound'WeaponSounds.BaseShieldReflections.BBulletReflect1' BulletSounds(1) = Sound'WeaponSounds.BaseShieldReflections.BBulletReflect2' BulletSounds(2) = Sound'WeaponSounds.BaseShieldReflections.BBulletReflect3' BulletSounds(3) = Sound'WeaponSounds.BaseShieldReflections.BBulletReflect4' BulletSounds(4) = Sound'WeaponSounds.BaseImpactAndExplosions.BBulletImpact1' BulletSounds(5) = Sound'WeaponSounds.BaseImpactAndExplosions.BBulletImpact2' BulletSounds(6) = Sound'WeaponSounds.BaseImpactAndExplosions.BBulletImpact3' BulletSounds(7) = Sound'WeaponSounds.BaseImpactAndExplosions.BBulletImpact4' BulletSounds(8) = Sound'WeaponSounds.BaseImpactAndExplosions.BBulletImpact5' BulletSounds(9) = Sound'WeaponSounds.BaseImpactAndExplosions.BBulletImpact6' BulletSounds(10)= Sound'WeaponSounds.BaseImpactAndExplosions.BBulletImpact7' BulletSounds(11)= Sound'WeaponSounds.BaseImpactAndExplosions.BBulletImpact8' BulletSounds(12)= Sound'WeaponSounds.BaseImpactAndExplosions.BBulletImpact9' BulletSounds(13)= Sound'WeaponSounds.BaseImpactAndExplosions.BBulletImpact11' BulletSounds(14)= Sound'WeaponSounds.BaseImpactAndExplosions.BBulletImpact12' BulletSounds(15)= Sound'WeaponSounds.BaseImpactAndExplosions.BBulletImpact13' BulletSounds(16)= Sound'WeaponSounds.BaseImpactAndExplosions.BBulletImpact14' // Water WaterDamage = 150 VehicleDrowningDamType = Class'Gameplay.Drowned' //Shader FX SpawnOverlay(0) = Shader'XGameShaders.PlayerShaders.VehicleSpawnShaderRed' SpawnOverlay(1) = Shader'XGameShaders.PlayerShaders.VehicleSpawnShaderBlue' // Misc VehicleIcon = (Material=Texture'AS_FX_TX.HUD.TrackedVehicleIcon',SizeX=64,SizeY=64) bSpecialHUD = True bSetPCRotOnPossess = False bCanTeleport = False // Sounds SoundRadius = 200 TransientSoundRadius = 600
Functions[edit]
(incomplete)
- bool HasWeapon()
- bool IsFiring()
- bool SpokenFor( Controller C)
- Used by bots to reserve vehicle
- SetReservation( Controller C)
- Vehicle OpenPositionFor( Pawn P)
- Returns a vehicle with an open slot
- bool TryToDrive( Pawn P )
- DriverDied()
- int NumPassengers() (simulated)
- AIController GetBotPassenger()
- Return the AIController of the first bot found in vehicle
- Pawn GetInstigator()
- float ChargeBar() (simulated)
- bool FastVehicle()
- AI hint
- bool IsDeployed()
- SetTeamNum( byte T )
- VehicleExplosion( vector MomentumNormal, float PercentMomentum )
- ServerPlayHorn( int HornIndex )
- DrawHUD( Canvas Canvas ) (simulated)
- array<Vehicle> GetTurrets()
Events[edit]
- NotifyEnemyLockedOn()
- Notify vehicle that an enemy has locked on to it
- NotifyEnemyLostLock()
- VehicleLocked( Pawn P )
- CheckReset()
- Vehicle has been in the middle of nowhere with no driver for a while, so consider resetting it
- bool IsVehicleEmpty()
- TeamChanged() (simulated)
- TakeImpactDamage( float AccelMag )
- KImpact( Actor Other, vector Pos, vector ImpactVel, vector ImpactNorm )
- ApplyFireImpulse( bool bAlt )
- DestroyAppearance() (simulated)
- Called at the beginning of VehicleDestroyed state
- ClientVehicleExplosion( bool bFinal ) (simulated)
- SVehicleUpdateParams() (simulated)
States[edit]
- VehicleDestroyed
- VehicleDisintegrated
Known Subclasses[edit]
ONSVehicle +-ONSChopperCraft | +-ONSAttackCraft | +-ONSDualAttackCraft (Bonus Pack) +-ONSHoverCraft | +-ONSHoverBike +-ONSPlaneCraft | +-ONSBomber +-ONSTreadCraft | +-ONSHoverTank | +-ONSHoverTank_IonPlasma +-ONSWheeledCraft +-ONSArtillery (Bonus Pack) +-ONSGenericSD +-ONSMobileAssaultStation +-ONSPRV +-ONSRV +-ONSShockTank (Bonus Pack)
Related Topics[edit]
- Vehicles – Main topic on vehicles
Discussion[edit]
odo324: Just a reminder, everyone's already allowed to add/modify this page. If you know something that isn't here, please post it (wherever most appropriate) ASAP!
SuperApe: Slight editing. Added subclass tree, functions, events and states. Comments and questions belong in Discussion, to be refactored. Once refactored, remove the discussion. The struct properties are not presented well. There is no need to fill in property definitions if you don't know the answer. (iow, don't give a question as a definition) My advice is to keep it standard. As an example, refer to other class pages.
SuperApe: Finished property markup.