Legacy:LevelGameRules

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 18:39, 21 November 2005 by imported>SuperApe
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
UT2003 :: Actor >> Info >> LevelGameRules (Package: Engine)

This class can be extended and then placed in a map so that mappers can control variables in the GameType for that map.

To use this actor in your map in UT2003 create a subclass of LevelGameRules, add some code to UpdateGame() and add an actor of this new subclass somewhere in your map.

In UT2004 v3236 and above you can place this actor in a map to automatically add certain mutators to the game when running the map.

Properties

array< class<Mutator> > MapMutator 
Only UT2004 v3236 and above. Specifies a list of mutator classes that should be active when the map is played.

Methods

UpdateGame (GameInfo G) 
In UT2003 and UT2004 before v3236 
Called from DeathMatch.InitGame() before any other InitGame() code is executed. When subclassed this allowes mappers to modify any property of the GameInfo, but keep in mind that there is no base mutator yet, so all actors spawned from here must have bGameRelevant=True set in their default properties or they will destroy themselves immediately after logging an Accessed None warning.
In UT2004 v3236 and above
Called from DeathMatch.InitGame() after the Mutators and GameRules have been initialized. This adds all mutator classes specified in the MapMutator list unless they are already active. This makes writing and using an embedded mutator much easier because you only have to add an Actor >> Info >> LevelGameRules and set its MapMutator property instead of having to add self-registration code to your mutator class.