Legacy:ONSVehicle

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 10:57, 14 June 2005 by Sweavo (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is the base class for vehicles in UT2004.

Properties

Weapons

struct native export DriverWeaponStruct
Custom struct. Holds the info to assign a weapon to a bone.
var() class<ONSWeapon> DriverWeaponStruct.WeaponClass
The class of weapon the driver may use. This may be an "ONSWeapon" or any of its subclass. Note that only the driver uses "ONSWeapon" class of weapons.
var() name DriverWeaponStruct.WeaponBone
Bone to attach "its sibling variable" to.
var(SVehicle) array<DriverWeaponStruct> DriverWeapons
A liniar array consisting of "DriverWeaponStruct" variables. Assigned in the PostNetBeginPlay() function. Each element holds an individual "DriverWeaponStruct" variable.
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" vehicle (yes, that cannon is actually two completely separate weapons, unrelated to firing modes). I don't recall any other vehicle that has two driver weapons.
var array<ONSWeapon> Weapons
An array of spawned classes (taken from "DriverWeapons"). Each is a reference to the actual weapon object. Only applies to the driver! Assigned in the PostNetBeginPlay() function.
struct native export PassengerWeaponStruct
Custom struct. Holds the info to assign a weapon pawn to a bone.
var() class<ONSWeaponPawn> PassengerWeaponStruct.WeaponPawnClass
The class of weapon the driver may use. This my be an "ONSWeaponPawn" or any of its subclass.
var() name PassengerWeaponStruct.WeaponBone
Bone to attach "its sibling variable" to.
var(SVehicle) array<PassengerWeaponStruct> PassengerWeapons
A liniar array consisting of "PassengerWeaponStruct" variables.
Each element holds an individual "PassengerWeaponStruct" variable.
Because each element applies to each passenger, they can each control one weapon. This can be seen with the "*ONSMobileAssaultStation" vehicle (one weaponpawn/passenger, I don't recall any vehicle that has two weapons for a single passenger.
var array<ONSWeaponPawn> WeaponPawns
An array of spawned classes (taken from "PassengerWeapons". Each is a reference to the actual object. Only applies to passengers! Assigned in the PostNetBeginPlay() function.
var byte ActiveWeapon
The array element number in the “Weapons[]” variable. This defines the currently selected weapon.
var rotator CustomAim
A modification of direction, used for weapon aiming.

Internal C++ Code: "Onslaught.ONSVehicle.cpp" (Starting @ line 188)<uscript>if (bCustomAiming) Weapons(ActiveWeapon)->SetAim(Weapons(ActiveWeapon)->Location + Weapons(ActiveWeapon)->AimTraceRange * CustomAim.Vector(), Rotation);</uscript>

Internal C++ Code: "Onslaught.ONSWeapon.cpp" (Starting @ line 505)<uscript>if (bCustomAiming) Gun->SetAim(Gun->Location + Gun->AimTraceRange * CustomAim.Vector(), VehicleBase ? VehicleBase->Rotation : Rotation);</uscript>

odo324: Not used in most (if not all?) vehicles! Could use an idea as too 'why' this ability would be helpful.
var bool bHasAltFire
Controls whether altfire events are passed to any ONSWeapons the vehicle is using. It is set to false for vehicles that have special alt-fires inside the vehicle itself, for example the Scorpion (ONSRV) and Manta (ONSHoverBike).
odo324: Does this apply for ALL the veachle's ONSWeapons?

Team Status

The texture for whatever team the vehicle is on.

var() material RedSkin
Material used when assigned to the Red Team.
var() material BlueSkin
Material used when assigned to the Blue Team.

Sound

var() sound IdleSound
...used when a driver exists but is not driving.
var() sound StartUpSound
...used when a player enters the vehicle.
var() sound ShutDownSound
...used when a player leaves the vehicle.

Force Feedback

Even though you can, it's best not to change these.

var() string StartUpForce
The force feed back played when you get in.
var() string ShutDownForce
The force feed back played when you get out.

Proximity Viewshake

var() float ViewShakeRadious
Distance from the vehicle's origin that view starts to shake.
var() rotator ViewShakeRotMag
Magnitude (speed?) of rotational movements.
var() float ViewShakeRotFreq
Frequency (rate?) of rotational movements.
var() vector ViewShakeOffsetMag
Magnitude (speed?) of offset movements.
var() float ViewShakeOffsetFreq
Frequency (rate?) of offset movements.
var float ViewShakeLastCheck
Internal.

Damage and Destruction

var() StaticMesh DestroyedVehicleMesh
The 'killed' version of the vehicle.
var() class<Emitter> DestructionEffectClass
Emitter effect to spawn, when the vehicle is 'killed'.
var() class<Emitter> DisintegrationEffectClass
Emitter effect to spawn, when the vehicle is destroyed (think 'player death effect').
var() float DisintegrationHealth
Related with the previous variable?

Internal C++ Code: "Onslaught.ONSVehicle.cpp" (Starging @ line 155)<uscript>if (!bDisintergrateVehicle && Health <= DisintegrationHealth) { bDisintegrateVehicle = true; eventClientVehicleExplosion(true); }</uscript>

Sweavo: You'll see in the game that you can destroy a vehicle so that it takes on the DestroyedVehicleMesh and is no longer any use to get in or use. If you then shoot it with something big like the goliath, it'll go one further and explode into fragments. I'm guessing this is that this threshold is for.

var() range DestructionLinearMomentum
Speed of straight 'point-to-point' movement?
var() range DestructionAngularMomentum
Speed of rotational movement?
var() float TimeBetweenImpactExplosions
While destroyed, specify the maximum amount of time after an explosion b4 another can occur?
var() array<sound> ExplosionSounds
An array of sounds used for the explosions, when destroyed.
var() float ExplosionSoundVolume
Volume at which to play "ExplosionSounds".
var() float ExplosionSoundRadius
Sound radius of "ExplosionSounds".
var byte ExplosionCount
Possibly Internal?
var byte OldExplosionCount
Possibly Internal?
var float LastVelocitySize
Possibly Internal?
var float LastImpactExplosionTime
Possibly Internal?
var float LastCheckUpsideDownTime
Possibly Internal?
var float UpsideDownDamage
var float ExplosionDamage
var float ExplosionRadius
var float ExplosionMomentum
var class<DamageType> ExplosionDamageType
var class<DamageType> DestroyedRoadKillDamageType
DamageType for when vehicle runs over/crushes someone after being destroyed.
var() class<ONSDamagedEffect> DamagedEffectClass
var() float DamagedEffectScale
var() vector DamagedEffectOffset
var() float DamagedEffectHealthSmokeFactor
Proportion of default health before it starts SMOKING.
var() float DamagedEffectHealthFireFactor
Proportion of default health before it starts BURNING.
var() float DamagedEffectAccScale
var() float DamagedEffectFireDamagePerSec
var float DamagedEffectAccuredDamage
var ONSDamagedEffect DamagedEffect

Most Bools

var bool bDestroyAppearance
var bool bDisintegrateVehicle
var bool bHadFire
Internal.
var() bool bEnableProximityViewShake
var() bool bOnlyViewShakeIfDriven
var bool bSoundsPrecached
var bool bNeverReset
var bool bEjectPassengersWhenFlipped
var bool bDriverCannotLeaveVehicle
var bool bCannotBeBased
var() vector FireImpulse
var() vector AltFireImpulse
var bool bHasFireImpulse
var bool bHasAltFireImpulse
var bool bCustomAiming
Whether this vehicle's aiming will be modified.
var const bool bIsAwake
Used for Replication.
var const bool bHasBeenAwake
Probably internal.
var bool bAltFocalPoint
Used by the AI. This overrides the AI's focal point.
var bool AltFocalPoint

Explosion Camera Shakes

var() vector ShakeRotMag
How far to rotate the view.
var() vector ShakeRotRate
How fast to rotate the view.
var() float ShakeRotTime
How much time to rotate the instigator's view.

odo324: Nice explanation, but what does that explanation mean?

var() vector ShakeOffsetMag
Maximum view offset vertically.
var() vector ShakeOffsetRate
How fast to vertically offset the view.
var() float ShakeOffsetTime
How much time to offset the view.

Impact Variables

struct native export ImpactInfoStruct
Another custom struct. Holds the information for a single impact.
var actor ImpactInfoStruct.Other
var vector ImpactInfoStruct.Pos
var vector ImpactInfoStruct.ImpactVel
var vector ImpactInfoStruct.ImpactNorm
var vector ImpactInfoStruct.ImpactAccel
var ImpactInfoStruct ImpactInfo
var int ImpactTicksLeft
var() float ImpactDamageTics
var() flost ImpactDamageThreshold
var() float PImpactDamageMult
var() array<Sound> ImpactDamageSounds

Sparks

var() class<ONSImpactSparks> SparkEffectClass
var() editinline ONSImpactSparks SparkEffect
var() float SparkAdvanceFactor

Headlights

var array<ONSHeadlightCorna> HeadlightCorona
One array element for each Headlight.
var() array<vector> HeadlightCronaOffset
One array element for each headlight.
var() Material HeadlightCronaMaterial
A single material for all headlights.
var() float HeadlightCronaMaxSize
One size for all headlights.
var ONSHeadlightProjector HeadlightProjector
var() Material HeadlightProjectorMaterial
If null, do not create projector.
var() vector HeadlightProjectorOffset
var() rotator HeadlightProjectorRotation
var() float HeadlightProjectorScale

Debugging Variables

var string DebugInfo

AI Variables

var sound LockedOnSound
The sound that will indicate 'this' vehicle is locked onto.
var float ResetTime
If this vehicle has no driver, CheckReset() will be called at 'this' time.
var float LastRunOverWarningTime
Last time checked for pawns in front of vehicle and warned them of their impending doom. :)
var float MinRunOverWarningAim
var bot Reservation
Bot that's about to get in this vehicle.
var int OldYaw
Used by the AI. Don't touch.

Correct Aim Indicator (Crosshair Modification) Variables

For clarity, I split the “CrosshairX” and “CrosshairY” variables. Although they 'were' declared simultaneously, they are in fact completely separate ordinary float variables.

var config color CrosshairColor
var config float CrosshairX
var config float CrosshairY
var config texture CrosshairTexture

Inherited Variables

float VehicleMass
Defined in SVehicle
float MomentumMult
Defined in Vehicle

Default Properties

<uscript> // 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'

// Sparks: “For the last time, I'm not crippled!" 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

// 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 = “Hijecked” 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 </uscript>


Known Subclasses

Related Classes


Thoughts

“Thoughts” refers to questions and theories/hypotheses that need clarification.

Goals:

  • Better organize confusion regarding this class.
  • Help prevent posting without updating the info.
  • Reduce non-productive comments.

Rules:

  • No rants, blocks of code, or discussions!
  • Answer by...
    1. Updating this page (above)
    2. Then, posting a short reference to it, here after the "Thought".
  • Don't delete other people's thoughts unless they're pointless or very simplistic. Modifying for clarity is perfectly fine.
This is NOT a “quick answer” section! Thoughts could be posted for many months b4 someone has an answer. Please, at least take a couple of DAYS to find an answer yourself.

Your Thoughts:

  • What is ActiveWeapon?
    • The weapon in which the player is holding; its definition has been updated.
  • What does the “ActiveWeapon” variable represent?
    • “The currently selected weapon, out of all weapons available to the player/bot.” Updated the definition.
  • Drivers use ONSWeapon while passengers use ONSWeaponPawn. Need to note the general differences between the weapons a driver and passengers can use.
  • Because all passengers have their weapons listed in one variable (vs. the individual driver's weapons list), does that REALLY mean each passenger can only have one weapon?

Category:Legacy Class (UT2004)

Comments and Discussions:

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!