My program doesn't have bugs. It just develops random features.
Legacy:CTFFlag
From Unreal Wiki, The Unreal Engine Documentation Site
This is the flag in Capture the Flag. The two subclasses, xBlueFlag and xRedFlag, have their default properties set up with the corresponding skin and light color, and they also initate the animation loop.
SameTeamTouch
and ValidHolder
are the two functions most important to CTF gameplay.
Contents
Properties[edit]
- TeamNum
- Which team the flag belongs to.
- Team
- The UnrealTeamInfo for the flag's team.
- OldHolder
- The flag's previous holder.
- GRI
- The current GameReplicationInfo. Appalently not used outside of
UpdateForTeam
.
Methods[edit]
- UpdateForTeam
- Apply the team's symbol to the flag's skin.
- SetGRI
- Calls
UpdateForTeam
. - SameTeam
- Is the given Controller on the flag's team?
- SameTeamTouch
- Overridden in
Dropped
state. - CheckPain
- Overridden in
Dropped
state.
Inherited from Actor[edit]
- PostBeginPlay
- Calls
SetGRI
. - Landed
- Return to standard "on the ground" orientation.
- FellOutOfWorld
- Sends the flag home.
Inherited from GameObject[edit]
- SetHolder
- Alert the CTFSquadAIs of the event.
- Drop
- Gives the flag some velocity and random spin.
- ValidHolder
- For teammates, calls
SameTeamTouch
. Otherwise, enemy players can pick up the flag. - LogReturned
- LogDropped
Home state[edit]
- SameTeamTouch
- If the player is carrying a flag, a point is scored.
- LogTaken
- Timer
- Makes sure the flag really is on the base.
- BeginState
- Makes the base visible instead of the flag.
- EndState
- Makes the flag visible instead of the base.
Held state[edit]
- Timer
- Sends the flag home if the holder is somehow lost.
- BeginState
- Just sets the timer. The GameObject function calls UnrealPawn.HoldGameObject to make the flag get physically carried.
- EndState
Dropped state[edit]
- SameTeamTouch
- A teammate has touched the flag, so it goes home.
- LogTaken
- CheckFit
- Make sure the flag can actually fit where it was dropped. Otherwise it goes home.
- CheckPain
- TakeDamage
- PhysicsVolumeChange
- BeginState
- Sets up collision properties.
- EndState
- Timer
- Broadcasts a message, then lets GameObject do the sending home.
Known Subclasses[edit]
Related Topics[edit]
Discussion[edit]
Uncommon: Anyone have an idea why the animation is set up in the subclasses? It's exactly the same in both.
SuperApe: These are Mesh animations. See the Mesh Browser.