Always snap to grid

Legacy:OverloadUT/Making CTF4 Compatible Mutators

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search

Right now this is just a scratch page with information about how to make CTF4 compatible mutators. I will write down topics here as I think of them. Eventually I'll flesh it out into a full useful page.

Accessing Teams[edit]

Teams can be accessed in the OLTeamsGameReplicationInfo as Teams[0-3]. If you are going to iterate through the teams, be SURE to check the NumTeams variable (also in OLTeamsGameReplicationInfo so that you do not access none.

Accessing Flags[edit]

Flags are stored in the OLTeamsPlayerReplicationInfo as HasFlags[], which is a variable size array. Get the length of that array to see how many flags a player is holding.

Keep in mind that it is possible for a player to be holding his own flag, so make sure you check that if it matters to your mod.

Dropping flags[edit]

Flags can either be dropped individually by accessing the appropriate flag (see above) and calling the Drop() function, or you can do it the same way it's done in normal CTF - via the PlayerReplicationInfo's HasFlag variable. Simply call HasFlag.Drop() function and the player will drop ALL the flags.

Accessing Team Symbols[edit]

Team Symbols are stored in the OLTeamsGameReplicationInfo as OLTeamSymbols[0-3]. Do NOT access the normal TeamSymbols[0-1] variable, as that will not return the proper symbols.