Other great resources: Official JS API docs, Scripting Forum
applyLimitSet()
- Aubergine
Owned by Aubergine
Merges limits set by your script with limits set on the Structure Limits Screen...
Â
Syntax
hackNetOff(); /* set default structure limits here using setStructureLimits() */ applyLimitSet(); hackNetOn();
Parameters
There are no parameters for this function.
Return value
Value | Type | Description | Game version |
---|---|---|---|
undefined | Undefined | The function always returns undefined | 3.1 Beta 1 |
Example
hackNetOff(); for (var playnum=0; playnum<maxPlayers; playnum++) { setStructureLimits("A0LightFactory", 5, playnum); setStructureLimits("A0PowerGenerator", 8, playnum); setStructureLimits("A0ResearchFacility", 5, playnum); setStructureLimits("A0CommandCentre", 1, playnum); setStructureLimits("A0ComDroidControl", 1, playnum); setStructureLimits("A0CyborgFactory", 5, playnum); setStructureLimits("A0VTolFactory1", 5, playnum); } applyLimitSet(); hackNetOn();
This function should only be used during Player Initialisation otherwise desynchs may occur.
Availability 3.1 B1+
Requires:
- Warzone 3.1 Beta 1 or above
Contents
Jump to:
See also
- Player Initialisation – detailed overview of the player initialisation sequence
- getStructureLimit() – get current limits for a specific structure type
- isStructureAvailable() – check if you can build the specified structure (eg. not reached structure limits)
- Enhanced Situation Reporting Mod – the rules.init.js is a good example of using applyLimitSet()
- setStructureLimits() – change how many structures of a given type a player can make.
Â