Editing Mod API Reference:ClientGame

Jump to: navigation, search

Warning: You are not logged in.

Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 11: Line 11:
 
* '''GetStanding''': A function used to get the [[Mod API Reference:GameStanding|GameStanding]] for any turn of the game.  Pass this function two arguments:  first, an integer representing what turn to get (0 for the start of the game, 1 for the second turn, 2 for the third turn, etc.)  Second, pass a callback function that will get called with the [[Mod API Reference:GameStanding|GameStanding]].  In the event of an error, such as lack of an internet connection, your callback will not be called and instead the player will get a "Could not connect" message.
 
* '''GetStanding''': A function used to get the [[Mod API Reference:GameStanding|GameStanding]] for any turn of the game.  Pass this function two arguments:  first, an integer representing what turn to get (0 for the start of the game, 1 for the second turn, 2 for the third turn, etc.)  Second, pass a callback function that will get called with the [[Mod API Reference:GameStanding|GameStanding]].  In the event of an error, such as lack of an internet connection, your callback will not be called and instead the player will get a "Could not connect" message.
 
* '''GetTurn''': A function used to get the [[Mod API Reference:GameTurn|GameTurn]] for any turn of the game.  Identical to GetStanding in every way, except that it calls back your function with a [[Mod API Reference:GameTurn|GameTurn]].
 
* '''GetTurn''': A function used to get the [[Mod API Reference:GameTurn|GameTurn]] for any turn of the game.  Identical to GetStanding in every way, except that it calls back your function with a [[Mod API Reference:GameTurn|GameTurn]].
* '''Orders''' ''Array<[[Mod API Reference:GameOrder|GameOrder]]>'': Allows you to read and write the orders that the player is building up in the orders list for the current turn.  You can call this property to see the orders, or assign a list of orders to it to replace the player's orders with your list.
+
* '''Orders''' ''List<[[Mod API Reference:GameOrder|GameOrder]]>'': Allows you to read and write the orders that the player is building up in the orders list for the current turn.  You can call this property to see the orders, or assign a list of orders to it to replace the player's orders with your list.
 
* '''CreateDialog''': A function used to create a new dialog on the screen for players to interact with.  Pass a single function callback as a argument to CreateDialog.  Your function callback will be passed the same arguments as the the Client_PresentMenuUI hook, documented at [[Mod Hooks]]
 
* '''CreateDialog''': A function used to create a new dialog on the screen for players to interact with.  Pass a single function callback as a argument to CreateDialog.  Your function callback will be passed the same arguments as the the Client_PresentMenuUI hook, documented at [[Mod Hooks]]
 
* '''SendGameCustomMessage''': A function used to send a message to the server, which will be handled by the Server_GameCustomMessage hook as documented at [[Mod Hooks]].  Note that this message is rate-limited to 5 calls every 5 seconds per client to avoid extra tax on the server.    Arguments:
 
* '''SendGameCustomMessage''': A function used to send a message to the server, which will be handled by the Server_GameCustomMessage hook as documented at [[Mod Hooks]].  Note that this message is rate-limited to 5 calls every 5 seconds per client to avoid extra tax on the server.    Arguments:

Please note that all contributions to Warzone Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Warzone Wiki:Copyrights for details). Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox