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

Legacy:GameObject

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT2003 :: Actor >> Decoration >> GameObject (Package: UnrealGame)

GameObject is an abstract, notplaceable parentclass for all gameplay-related objects players can pick up. Most (if not all) of these objects need to be brought to a GameObjective actor (HomeBase) in order to score.

Properties[edit]

All of these properties are Hidden.

bool bHome 
Is the object at its home location?
bool bHeld 
Is the object being held?
bool bDisabled 
Used to hide the object between rounds.
bool bLastSecondSave 
UnrealPawn Holder 
The Pawn that is holding the object
TeamPlayerReplicationInfo HolderPRI 
The holder's PlayerReplicationInfo.
GameObjective HomeBase 
The GameObjective where the object starts out.
float TakenTime 
When the object was taken from its home.
float MaxDropTime 
How long the object will sit in its Dropped state before it resets.
Controller FirstTouch 
Who touched this objective first.
array<Controller> Assists 
Other players who held it after FirstTouch.
name GameObjBone 
The name of the bone to attach to while held.
vector GameObjOffset 
rotator GameObjRot 
TeamInfo OldTeam 
Used mainly by xBombFlag to keep track of when a team has gone "on offense".

Functions[edit]

PostBeginPlay() 
Assumes the Owner is the HomeBase GameObjective.
bool CanBeThrownBy( Pawn P ) 
Returns true.
bool CanBePickedUpBy( Pawn P ) 
Returns true.
SetHolder( Controller C ) 
This function is given a Controller, and assumes that the controller's pawn is an UnrealPawn. This causes problems with the Vehicle Pickups mutator, which also allows picking up flags in vehicles. When a vehicle picks up a flag, the controller's pawn is a Vehicle, causing some accessed nones and other problems.
Score() 
Disables Touch(), resets Location and Rotation to HomeBase and switches to state Home.
Drop( vectro NewVel ) 
Logs a drop. Sets location, velocity and switches to state Dropped.
SendHome() 
Sets location to homebase and switches to state Home.
SendHomeDisabled ( float Timeout ) 
EMPTY
CalcSetHome() 
Do some cleanup before going home. Includes AI help.
ClearHolder() 
Make sure nobody thinks they're holding the object.
SetDisable( bool disable ) (protected) 
Sets bDisable and bHidden.
Actor Position() 
Get the Actor that represents the object's position. May be the object itself, the home base, or the holder.
bool IsHome 
Returns false.
bool ValidHolder( Actor Other ) 
Can the given Actor hold this object?
Touch( Actor Other ) (singluar) 
This is where it gets picked up.
Landed( vector HitNormall ) 
Signal to bots that it's available at it's current Location.
BaseChange() (singular, simulated) 
EMPTY

Events[edit]

FellOutOfWorld(eKillZType KillType) 
Calls SendHome().
NotReachableBy( Pawn P ) 
Calls SendHome() if not reachable.
LogTaken( Controller C ) 
EMPTY
LogDropped 
EMPTY
LogReturned 
EMPTY

States[edit]

Home (auto)[edit]

Ignores SendHome, Score, Drop.

Functions[edit]

CheckTouching() 
bool IsHome() 
Returns true.
BeginState() 
Disables Touch() during setting bHome, Location and Rotation. Enables Touch().
EndState() 
Disables bHome to false. Sets TakenTime.
Begin 
Sets Sleep for 0.05 seconds and calls CheckTouching(), in case enemy was sitting on HomeBase.

Held[edit]

Ignores SetHolder, SendHome.

Functions[edit]

BeginState() 
Sets properties associated with holding.
EndState() 
Unsets the properties associated with holding.

Dropped[edit]

Ignores Drop.

Functions[edit]

Timer() 
Calls SendHome().
BeingState() 
Sets Physics to PHYS_Falling and sets Timer for MaxDropTime.
EndState() 
Sets Physics to PHYS_None.

Known Subclasses[edit]

GameObject
  +- CTFFlag
  |   +- xBlueFlag
  |   +- xRedFlag
  +- GameObject_EnergyCore
  +- xBombFlag

Related Topics[edit]