![]() Receive supports nil, boolean, handle, integer, number, string, vector, and matrix data types. Type is an arbitrary one-character string indicating the script-defined message type.ĭata values passed as parameters to Send will arrive as parameters to Receive in the same order they were sent. This function should return true if it handled the message and false, nil, or none if it did not.įrom is the network player id of the sender. )Ĭalled when a script-defined message arrives. boolean Receive ( integer from, string type. DeletePlayer ( integer id, string name, integer team )Ĭalled when a player leaves the session. This function is not called for the local player. This indicates that a player has finished loaded and started simulating. AddPlayer ( integer id, string name, integer team )Ĭalled when a player starts sending state updates. This function gets called for the local player. Players that join joining after the host launches trigger CreatePlayer on entering the pre-game lobby. Players that join before the host launches trigger CreatePlayer just before the first Update. CreatePlayer ( integer id, string name, integer team ) This function will get a lot of traffic so it should not do too much work. This function is normally called for "important" game objects, and excludes things like Scrap pieces. AddObject ( handle h )Ĭalled when a game object gets added to the mission ![]() Handle is the game object that was created. This function performs most of the mission script's game logic. BATTLEZONE 2 ODF FILES UPDATEUpdate ( number timestep )Ĭalled once per frame after updating the network system and before simulating game objects. PageUp, PageDown, Home, End, Backspace, and so forth). The base key for other keys is the label on the keycap (e.g. The base key for keys corresponding to a printable ASCII character is the upper-case version of that character. Key is a string that consisting of zero or more modifiers (Ctrl, Shift, Alt) and a base key. Use this function to perform any one-time script initialization. Start ()Ĭalled when the mission starts for the first time. The console window will print the saved values in human-readable format. It does not support function, thread, or arbitrary userdata types. Save supports nil, boolean, handle, integer, number, string, vector, and matrix data types. Save ()Ĭalled when saving state to a save game file, allowing the script to preserve its state.Īny values returned by this function will be passed as parameters to Load when loading the save game file. The console window will print the loaded values in human-readable format. Load supports nil, boolean, handle, integer, number, string, vector, and matrix data types. )Ĭalled when loading state from a save game file, allowing the script to restore its state.ĭata values returned from Save will be passed as parameters to Load in the same order they were returned. LuaMission looks up the functions by name so they can have different functions assigned to them at runtime. The Lua scripting system calls these script-defined functions when various script events occur. "en", "fr", "de", "es", "it", "pt" or "ru" string LastGameKeyĬontains the most recently pressed game key (e.g. ![]() BATTLEZONE 2 ODF FILES CODE"ENGLISH", "FRENCH", "GERMAN", "SPANISH", "ITALIAN", "PORTUGUESE", or "RUSSIAN" string LanguageSuffix Ĭontains the two-letter language code of the current language: BATTLEZONE 2 ODF FILES FULLinteger Language Ĭontains the index of the current language.Ĭontains the full name of the current language in all-caps: "1.5.2.27u1").īattlezone 1.5 versions start with "1" and Battlezone 98 Redux versions start with "2". string GameVersionĬontains current build version (e.g. The Lua scripting system defines some global variables that can be of use to user scripts. While a script could check the version number, it's faster and easier to check if the value or function is nil. Version numbers appearing in indicate the earliest version that supports the value or function. ![]() They offer the same functionality that the original designers used when creating the single-player campaign, along with new functionality back-ported fromīattlezone II: Combat Commander or added to fill notable gaps. This document describes the global script utility functions available for user-created Lua mission scripts. Battlezone Lua Script Utility Functions Battlezone Lua Script Utility FunctionsĬovers Battlezone up to version 1.5.2.27u1 ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |