My program doesn't have bugs. It just develops random features.

Difference between revisions of "UE3:UTVehicle Leviathan (UT3)"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
(Talk)
m (added native code snippet posted by Steve Polge)
Line 11: Line 11:
 
| abstract = yes
 
| abstract = yes
 
}}
 
}}
{{autogenerated}}
+
Implementation for the [[liandri:Leviathan#Unreal Tournament 3|Leviathan]].
Copyright 1998-2007 Epic Games, Inc. All Rights Reserved.
+
  
 
==Properties==
 
==Properties==
Line 475: Line 474:
 
'''Returns:'''
 
'''Returns:'''
 
:Figure out who we are targetting.
 
:Figure out who we are targetting.
 +
 +
'''Native implementation:'''
 +
<source lang="cpp">
 +
FVector AUTVehicle_Leviathan::GetTargetLocation(AActor* RequestedBy, UBOOL bRequestAlternateLoc) const
 +
{
 +
        if ( !RequestedBy )
 +
                return Super::GetTargetLocation();
 +
 +
        const INT NearestTurret = CheckActiveTurret(RequestedBy->Location, 0.f);
 +
 +
        if ( NearestTurret >= 0 )
 +
        {
 +
                return TurretCollision[NearestTurret]->LocalToWorld.GetOrigin() + FVector(0.f, 0.f, 45.f);
 +
        }
 +
        else
 +
        {
 +
                return Super::GetTargetLocation();
 +
        }
 +
}
 +
</source>
  
 
====TurretAlive====
 
====TurretAlive====

Revision as of 10:30, 22 July 2008

UT3 Object >> Actor >> Pawn >> Vehicle >> SVehicle >> UTVehicleBase >> UTVehicle >> UTVehicle_Deployable >> UTVehicle_Leviathan
Package: 
UTGame
Direct subclass:
UTVehicle_Leviathan_Content

Implementation for the Leviathan.

Properties

Property group 'Collision'

TurretCollision

Type: CylinderComponent

Array size: 4


Property group 'test'

StingerTurretTurnRate

Type: int


Default value: 8192

Property group 'UTVehicle_Leviathan'

MaxHitCheckDist

Type: float


Default value: 140.0

Internal variables

See UTVehicle_Leviathan internal variables.

Default values

Property Value
AirSpeed 850.0
bAllowAbortDeploy True
BaseEyeHeight 0.0
bEjectKilledBodies True
bEnteringUnlocks False
bFindGroundExit False
bKeyVehicle True
bLookSteerOnNormalControls True
bLookSteerOnSimpleControls True
bSeparateTurretFocus True
bStickDeflectionThrottle True
bUseAlternatePaths False
COMOffset
Member Value
X -20.0
Y 0.0
Z 0.0
Components[3] UTVehicleSimCar'SimObject'
DeployIconOffset 0.92
ExitRadius 350.0
EyeHeight 0.0
Health 6500
HornIndex 1
HornSounds[1] SoundCue'A_Vehicle_leviathan.SoundCues.A_Vehicle_Leviathan_Horn'
HUDExtent 500.0
InitialSpawnDelay 30.0
InnerExplosionShakeRadius 1500.0
MaxDeploySpeed 300.0
MaxDesireability 2.0
NeedToPickUpAnnouncement
Member Value
AnnouncementText "Man the Leviathan"
NonPreferredVehiclePathMultiplier 50.0
ObjectiveGetOutDist 2000.0
OuterExplosionShakeRadius 4000.0
RespawnTime 120.0
SimObj UTVehicleSimCar'SimObject'
SpawnRadius 425.0
StayUprightConstraintInstance RB_ConstraintInstance'UTGame.Default__UTVehicle_Leviathan:MyStayUprightConstraintInstance_8'
StayUprightConstraintSetup RB_StayUprightSetup'UTGame.Default__UTVehicle_Leviathan:MyStayUprightSetup_8'
StolenAnnouncementIndex 5
UprightLiftStrength 280.0
UprightTime 1.25
UprightTorqueStrength 500.0
VehicleNameString "Leviathan"
VehiclePositionString "in a Leviathan"

Subobjects

CollisionCylinder

Class: Engine.CylinderComponent

Inherits from: UTVehicle_Deployable.CollisionCylinder

No new values.

MyLightEnvironment

Class: Engine.DynamicLightEnvironmentComponent

Inherits from: UTVehicle_Deployable.MyLightEnvironment

Property Value
NumVolumeVisibilitySamples 4

MyStayUprightConstraintInstance_8

Class: Engine.RB_ConstraintInstance

No new values.

MyStayUprightSetup_8

Class: Engine.RB_StayUprightSetup

No new values.

SimObject

Class: UTGame.UTVehicleSimCar

Property Value
ChassisTorqueScale 0.2
EngineBrakeFactor 0.02
EngineRPMCurve
Member Value
Points
Member Value
InVal -500.0
OutVal 2500.0
Member Value
OutVal 500.0
Member Value
InVal 599.0
OutVal 5000.0
Member Value
InVal 600.0
OutVal 3000.0
Member Value
InVal 949.0
OutVal 5000.0
Member Value
InVal 950.0
OutVal 3000.0
Member Value
InVal 1100.0
OutVal 5000.0
FrontalCollisionGripFactor 0.18
HardTurnMotorTorque 1.0
LSDFactor 1.0
MaxBrakeTorque 8.0
MaxSteerAngleCurve
Member Value
Points
Member Value
OutVal 30.0
Member Value
InVal 1500.0
OutVal 20.0
SteerSpeed 50.0
StopThreshold 500.0
TorqueVSpeedCurve
Member Value
Points
Member Value
InVal -600.0
Member Value
InVal -200.0
OutVal 10.0
Member Value
OutVal 16.0
Member Value
InVal 540.0
OutVal 10.0
Member Value
InVal 650.0
WheelSuspensionBias 0.7
WheelSuspensionDamping 75.0
WheelSuspensionStiffness 50.0

SVehicleMesh

Class: Engine.SkeletalMeshComponent

Inherits from: UTVehicle_Deployable.SVehicleMesh

Property Value
LightEnvironment DynamicLightEnvironmentComponent'UTGame.Default__UTVehicle_Leviathan:MyLightEnvironment'
RBCollideWithChannels
Member Value
Untitled1 True
Untitled2 True
Untitled4 True

Functions

Native functions

CheckActiveTurret

native function int CheckActiveTurret (Object.Vector HitLocation, float MaxDist) const


GetTargetLocation

simulated native function Object.Vector GetTargetLocation (optional Actor RequestedBy, optional bool bRequestAlternateLoc) const

Overrides: Vehicle.GetTargetLocation

(Description copied from Vehicle.GetTargetLocation)


Returns:

Figure out who we are targetting.

Native implementation:

FVector AUTVehicle_Leviathan::GetTargetLocation(AActor* RequestedBy, UBOOL bRequestAlternateLoc) const
{
        if ( !RequestedBy )
                return Super::GetTargetLocation();
 
        const INT NearestTurret = CheckActiveTurret(RequestedBy->Location, 0.f);
 
        if ( NearestTurret >= 0 )
        {
                return TurretCollision[NearestTurret]->LocalToWorld.GetOrigin() + FVector(0.f, 0.f, 45.f);
        }
        else
        {
                return Super::GetTargetLocation();
        }
}

TurretAlive

native function bool TurretAlive (int TurretIndex) const


Events

CanDeploy

event bool CanDeploy (optional bool bShowMessage)

Overrides: UTVehicle_Deployable.CanDeploy

(Description copied from UTVehicle_Deployable.CanDeploy)


Returns:

true if this vehicle can deploy

ContinueOnFoot

event bool ContinueOnFoot ()

Overrides: UTVehicle.ContinueOnFoot

(Description copied from UTVehicle.ContinueOnFoot)
ContinueOnFoot() - used by AI Called from route finding if route can only be continued on foot.

Returns:

true if driver left vehicle

PostBeginPlay

simulated event PostBeginPlay ()

Overrides: UTVehicle_Deployable.PostBeginPlay

Initialization

ReplicatedEvent

simulated event ReplicatedEvent (name VarName)

Overrides: UTVehicle_Deployable.ReplicatedEvent

(Description copied from UTVehicle.ReplicatedEvent)
This event is triggered when a repnotify variable is received

Parameters:

  • VarName - The name of the variable replicated

RigidBodyCollision

simulated event RigidBodyCollision (PrimitiveComponent HitComponent, PrimitiveComponent OtherComponent, const out Actor.CollisionImpactData RigidCollisionData, int ContactIndex)

Overrides: UTVehicle.RigidBodyCollision

(Description copied from Actor.RigidBodyCollision)
Called when a PrimitiveComponent this Actor owns has:

   -bNotifyRigidBodyCollision set to true
   -ScriptRigidBodyCollisionThreshold > 0
   -it is involved in a physics collision where the relative velocity exceeds ScriptRigidBodyCollisionThreshold

Parameters:

  • HitComponent - the component of this Actor that collided
  • OtherComponent - the other component that collided
  • RigidCollisionData - information on the collision itslef, including contact points
  • ContactIndex - the element in each ContactInfos' ContactVelocity and PhysMaterial arrays that corresponds to this Actor/HitComponent

TakeDamage

simulated event TakeDamage (int Damage, Controller InstigatedBy, Object.Vector HitLocation, Object.Vector Momentum, class<DamageTypeDamageType, optional Actor.TraceHitInfo HitInfo, optional Actor DamageCauser)

Overrides: UTVehicle.TakeDamage

(Description copied from UTVehicle.TakeDamage)


See: Actor.TakeDamage()

Other instance functions

See UTVehicle_Leviathan instance functions.

States

Deployed

Deployed.CheckStability

function CheckStability ()

Overrides: UTVehicle_Deployable.Deployed.CheckStability

traces down to the ground from the wheels and undeploys the vehicle if wheels are too far off the ground