Mod API Reference:GameOrderEvent: Difference between revisions
Jump to navigation
Jump to search
Created page with " '''GameOrderEvent''': Subclass of GameOrder. This is a generic event that can present a message or modify territories. It can also control ..." |
No edit summary |
||
Line 7: | Line 7: | ||
== Functions == | == Functions == | ||
* '''WL.GameOrderEvent.Create'''('''playerID''' ''[[Mod API Reference:PlayerID|PlayerID]]'', '''message''' ''string'', '''visibleToOpt''' ''[[Mod API Reference:HashSet|HashSet]]<[[Mod API Reference: | * '''WL.GameOrderEvent.Create'''('''playerID''' ''[[Mod API Reference:PlayerID|PlayerID]]'', '''message''' ''string'', '''visibleToOpt''' ''[[Mod API Reference:HashSet|HashSet]]<[[Mod API Reference:PlayerID|PlayerID]]>'', '''terrModsOpt''' ''Array<[[Mod API Reference:TerritoryModification|TerritoryModification]]>'') (static) returns [[Mod API Reference:GameOrderEvent|GameOrderEvent]]: |
Revision as of 18:23, 15 April 2017
GameOrderEvent: Subclass of GameOrder. This is a generic event that can present a message or modify territories. It can also control which players can see it. It was added for use by Mods and is not used by any built-in game mechanics.
- Message string: The message displayed in the orders list. Must be specified.
- TerritoryModifications Array<TerritoryModification>: Optionally, can modify territories, such as changing ownership or armies.
- VisibleToOpt HashSet<PlayerID>: Defines who this event is visible to. Note that the player this event is assigned to can always see it, and any player who can see the affects of a territory modification can always see it as well. Set this to nil to mean that it should be visible to everyone (public). Set this to an empty list to indicate that the event should not be visible to anyone, except those that can see it by a previously mentioned rule.
Functions
- WL.GameOrderEvent.Create(playerID PlayerID, message string, visibleToOpt HashSet<PlayerID>, terrModsOpt Array<TerritoryModification>) (static) returns GameOrderEvent: