Superfighters Deluxe
IGame Class Referenceabstract

Access to certain information and functions about the currently running game world. Example: More...

Inheritance diagram for IGame:
abstract string Data [get, set]
 Use the SessionStroage or LocalStorage instead. This property is kept for backwards compatibility. More...
 
abstract IScriptStorage LocalStorage [get]
 Gets access to local storage. This storage is permanent between server restarts and between different played levels. Data is stored based on the current map/script's file path. Quirk: You're limited to a practical max storage limit to about 10 MB file sizes. Quirk: Changing the filename or placing the script in another folder will change the file path for the stored data. Quirk: You must test on a saved map for this to save data between runs in the map editor. More...
 
abstract IScriptStorage SessionStorage [get]
 Gets access to session storage. This storage is maintained between games for individual level scripts or extension scripts. This is reset when the server changes to a different map or the server restarts. For permanent storage use LocalStorage instead. More...
 
abstract IScriptStorage GetSharedStorage (string name)
 Gets access to a shared local storage, based on a name. Name must be valid (see parameter for more info). Calling this function the first time during a map will read the storage if it exist from file. More...
 
abstract bool IsEditorTest [get]
 Gets if this is run in the editor while testing a map. Useful if you want to enable (or disable) certain features for testing only. More...
 
abstract float TotalElapsedGameTime [get]
 Gets the total elapsed game-time, affected by slowmotion, in milliseconds since the game started. More...
 
abstract float TotalElapsedRealTime [get]
 Gets the total elapsed real-time in milliseconds since the game start. More...
 
abstract float SlowmotionModifier [get]
 Gets the slowmotion/time modifier in the game affected by slowmotion items and /settime command. More...
 
abstract bool IsFirstUpdate [get]
 Gets if the code is executing during the first update. More...
 
abstract Guid MapOriginalGUID [get]
 Gets the original GUID of the map, when the map was first created. More...
 
abstract Guid MapGUID [get]
 Gets the last saved GUID of the map, when the map was last updated. More...
 
abstract string MapName [get]
 Gets the name of the map. More...
 
abstract string MapAuthor [get]
 Gets the author of the map. More...
 
abstract bool TryGetText (string textId, out string value, params string[] args)
 Gets a text by id from the language file. More...
 
abstract bool TryGetText (string textId, out string value)
 Gets a text by id from the language file. More...
 
abstract string ReplaceTextTags (string text)
 Replaces text tags - intended for offline maps and campaigns. Use [TEXT=language.textId] to insert text from language texts by text id (case sensitive and uses the server's language setting). Use [KEY=KEY_CODE] to insert player one's keybindings. See config.ini file for the KEY_CODE names for the keybindings. More...
 
abstract int MapTotalPlayers [get]
 Gets the number of total players defined by the map. Only available for campaigns and survival type maps. Returns 0 if not set. More...
 
abstract float CurrentDifficulty [get]
 Gets the current difficulty based on map mode, players and progress in range [0.0-1.0]. Survival maps returns current players / total players. Campaigns maps returns 0.25 for easy, 0.5 for normal, 0.75 for hard and 1.0 for expert. Other maps return 1.0. More...
 
abstract DifficultyLevel SelectedDifficultyLevel [get]
 Gets the selected difficulty level in the current map. Only applicable for campaign maps where this will return the selected difficulty choosen by the host. Any other map will return DifficultyLevel.None and CurrentDifficulty 1.0. More...
 
abstract int MapRound [get]
 Gets the current map round while playing the same map - resets on map change. Starts on 1 and increment for each round while playing the same map. More...
 
abstract int CampaignCurrentMapPartIndex [get]
 Gets the current map part index for a campaign. Returns -1 for non-campaign maps. More...
 
abstract int CampaignTotalMapParts [get]
 Gets the total map parts for a campaign. Returns 0 for non-campaign maps. More...
 
abstract int SurvivalWave [get]
 Gets the current survival wave while playing the same map - resets on map change/restart. Starts on 1 and increment for each survival wave finished. More...
 
abstract int SurvivalExtraLives [get, set]
 Gets or Sets current survival extra lives for survival type maps - resets on map change/restart. More...
 
abstract bool SurvivalWaveCompleted [get]
 Gets if current survival wave is completed. Only updated after IsGameOver is true. This property returns false if all survivors are dead. More...
 
abstract bool StatsToKeepEnabled [get, set]
 Gets or Sets if stats should be kept when progressing on the same playthrough. This only applies to survival (clearing a wave or retrying a wave) and campaign (progressing to a new map part or dying). More...
 
abstract void SetStatsToKeep (StatsToKeep statsToKeep)
 Sets what kind of stats should be kept when progressing on the same playthrough. This only applies to survival (clearing a wave or retrying a wave) and campaign (progressing to a new map part or dying). More...
 
abstract StatsToKeep GetStatsToKeep ()
 Gets what kind of stats should be kept when progressing on the same playthrough. This only applies to survival (clearing a wave or retrying a wave) and campaign (progressing to a new map part or dying). More...
 
abstract bool StartupSequenceEnabled [get, set]
 Gets or Sets if the startup sequence of the map is enabled. The startup sequence will show GET READY and FIGHT text + play sound. More...
 
abstract bool DeathSequenceEnabled [get, set]
 Gets or Sets if the death sequence of the map is enabled. The death sequence will show a text "YOU ARE DEAD" + play sound. More...
 
abstract bool SuddenDeathEnabled [get]
 Gets if sudden death is enabled. More...
 
abstract bool SuddenDeathActive [get]
 Gets if sudden death is currently active. More...
 
abstract void ForceStartSuddenDeath (int suddenDeathTimeSeconds=45)
 Starts sudden death if not yet active. Sudden death means that no more crates will spawn and the time is reduced to the specified limit. Once the timer runs out and if there's no winner, everyone dies forcing a draw. More...
 
abstract bool TimeLimitActive [get]
 Gets if time limit is active and ticking. Remaining time can be retrieved via GetTimeLimitRemaining(). More...
 
abstract int TimeLimit [get]
 Gets the total time limit in the game in seconds. Returns 0 if TimeLimitActive is false. Use GetRemainingTimeLimit() to get the remaining time. More...
 
abstract TimeSpan GetRemainingTimeLimit ()
 Returns time limit remaining. Returns TimeSpan.Zero if TimeLimitActive is false. More...
 
abstract WeatherType GetWeatherType ()
 Gets the current weather type. More...
 
abstract void SetWeatherType (WeatherType value)
 Sets the current weather type. More...
 
abstract bool AutoVictoryConditionEnabled [get, set]
 Gets or Sets if auto victory condition is enabled. Auto victory condition applies to Versus and Challange map types. Custom, Survival and Campaign map types must be controlled when it's GameOver via triggers or scripts. More...
 
abstract MapType GetMapType ()
 Gets the current map type. More...
 
abstract void SetMapType (MapType gameType)
 OBSOLETE. DO NOT USE. This function is kept for backwards compatibility with olders scripts using this function. This does NOT change the MapType of the map. QUIRK: Setting MapType.Custom will be the same as setting AutoVictoryConditionEnabled = false; Setting MapType.Versus will be the same as setting AutoVictoryConditionEnabled = true; Using other MapTypes will be totally ignored by this function! More...
 
abstract bool IsGameOver [get]
 Checks if the game is over More...
 
abstract bool ChallengeCompleted [get, set]
 Gets or Sets if the challenge is completed successfully when calling SetGameOver(). This only works for Challenge type maps. More...
 
abstract void SetGameOver (string gameOverText)
 Sets the game as game over and shows a custom text. For Campaigns this will start the campaign all over. For Survival maps this will indicate that the current survival wave is over, if all players are dead the current wave will restart, if someone's alive it will progress. For Challenges this will end the challenge, the Game.ChallengeCompleted property determines if the challenge is completed successfully or not. More...
 
abstract void SetGameOver ()
 Sets the game as game over based on current map type. For Campaigns this will start the campaign all over. For Survival maps this will indicate that the current survival wave is over, if all players are dead the current wave will restart, if someone's alive it will progress. For Challenges this will end the challenge, the Game.ChallengeCompleted property determines if the challenge is completed successfully or not. /// More...
 
abstract void SetChallengeTimeLimit (int seconds)
 Sets a timeout in seconds for a challenge type map. Only works for challenge maps. The host controls the time limit in other map types (such as versus). QUIRK: To update the time limit you must first disable this (by setting 0) and in the next main update cycle set this to the new value you want to apply. More...
 
abstract void SetCampaignMapPart (int mapPartIndex)
 Sets the next campaign map part to the specified index. This also loads the next part instant. Assigning the same index as the current active map part index will restart the current map part, restoring the players' stats. Only works for campaign maps. More...
 
abstract IUser[] GetActiveUsers ()
 Gets all current connected users. This returns connected users and bots set up in the lobby. More...
 
abstract IUser GetActiveUser (int userIdentifier)
 Gets current connected user by UserIdentifier. More...
 
abstract IPlayer[] GetPlayers ()
 Gets all players currently spawned. More...
 
abstract IPlayer GetPlayer (int uniqueID)
 Gets the player with the given UniqueID. More...
 
abstract IObject[] GetObjectsByCustomID (string customID)
 Gets all Objects with the provided custom ID. More...
 
abstract T[] GetObjectsByCustomID< T > (string customID)
 Gets all Objects with the provided custom ID matching the specific generic type. More...
 
abstract IObject[] GetObjectsByCustomID (string[] customIDs)
 Gets all Objects with the provided custom IDs. More...
 
abstract T[] GetObjectsByCustomID< T > (string[] customIDs)
 Gets all Objects with the provided custom IDs matching the specific generic type. More...
 
abstract IObject GetSingleObjectByCustomID (string customID)
 Returns the first found object with the provided custom ID. More...
 
abstract T GetSingleObjectByCustomID< T > (string customID)
 Returns the first found object with the provided custom ID matching the specific generic type. More...
 
abstract T[] GetObjects< T > ()
 Gets all Objects matching the given type. More...
 
abstract IObject[] GetObjectsByName (string name)
 Gets all Objects matching the given tile name. More...
 
abstract IObject[] GetObjectsByName (string[] names)
 Gets all Objects matching the given tile names. More...
 
abstract IObject[] GetObjectsByArea (Area area, PhysicsLayer physicsLayer=PhysicsLayer.Active)
 Gets all objects that overlap with their AABB with the given area. More...
 
abstract T[] GetObjectsByArea< T > (Area area, PhysicsLayer physicsLayer=PhysicsLayer.Active)
 Gets all objects that overlap with their AABB with the given area matching the specific generic type. More...
 
abstract IObject GetSingleObjectByArea (Area area, PhysicsLayer physicsLayer=PhysicsLayer.Active)
 Gets the first object that overlap with its AABB with the given area. More...
 
abstract T GetSingleObjectByArea< T > (Area area, PhysicsLayer physicsLayer=PhysicsLayer.Active)
 Gets the first object that overlap with its AABB with the given area matching the specific generic type. More...
 
abstract IObject[] GetObjects (string customID)
 Gets all Objects with the provided custom ID. More...
 
abstract T[] GetObjects< T > (string customID)
 Gets all Objects with the provided custom ID matching the specific generic type. More...
 
abstract IObject[] GetObjects (Area area)
 Gets all objects that overlap with their AABB with the given area. Does not work with far background objects. More...
 
abstract T[] GetObjects< T > (Area area)
 Gets all objects that overlap with their AABB with the given area matching the specific generic type. More...
 
abstract IObject GetFirstObject (string customID)
 Gets the first best Object with the provided custom ID. More...
 
abstract T GetFirstObject< T > (string customID)
 Gets the first best Object with the provided custom ID matching the specific generic type. More...
 
abstract IObject GetFirstObject (Area area)
 Gets first best object that overlap with their AABB with the given area. Does not work with far background objects. More...
 
abstract T GetFirstObject< T > (Area area)
 Gets first best object that overlap with their AABB with the given area matching the specific generic type. Does not work with far background objects. More...
 
abstract IObject GetObject (int uniqueID)
 Gets the IObject by uniqueID. More...
 
abstract IObject GetObject (string customID)
 Gets the first best Object with the provided custom ID. More...
 
abstract T GetObject< T > (string customID)
 Gets the first best Object with the provided custom ID. More...
 
abstract IObject[] GetBurningObjects ()
 Gets all current objects on fire (where IObject.IsBurning is true). Note: The returned result is NOT ordered as burning objects get updated. More...
 
abstract T[] GetBurningObjects< T > ()
 Gets all current objects on fire (where IObject.IsBurning is true). Note: The returned result is NOT ordered as burning objects get updated. More...
 
abstract FireNode[] GetFireNodes ()
 Gets all current active fire nodes in the world. More...
 
abstract FireNode[] GetFireNodes (Area area)
 Gets all current active fire nodes in the world in the specified area. More...
 
abstract void EndFireNode (int instanceID)
 Ends the life of the specified fire node in the next fire update cycle. More...
 
abstract IObject[] GetTargetAIEnabledObjects ()
 Gets all objects currently enabled for bots to target. More...
 
abstract IObject[] GetMissileObjects ()
 Gets all objects currently tracked as missiles. Missile objects can collide with players and deal damage based on velocity even if collision is disabled. Normally used for smaller objects being thrown. Once the object collides with the world it will lose it's missile status. More...
 
abstract IProjectile[] GetProjectiles ()
 Gets all current projectiles. More...
 
abstract IProjectile GetProjectile (int projectileInstanceID)
 Gets the projectile with the specified projectile instanceID. More...
 
abstract IObject CreateObject (string objectID)
 Creates a new object in the world. More...
 
abstract IObject CreateObject (string objectID, Vector2 worldPosition)
 Creates a new object in the world. More...
 
abstract IObject CreateObject (string objectID, Vector2 worldPosition, float angle)
 Creates a new object in the world. More...
 
abstract IObject CreateObject (string objectID, Vector2 worldPosition, float angle, Vector2 linearVelocity, float angularVelocity)
 Creates a new object in the world. More...
 
abstract IObject CreateObject (string objectID, Vector2 worldPosition, float angle, Vector2 linearVelocity, float angularVelocity, int faceDirection)
 Creates a new object in the world. More...
 
abstract bool AutoSpawnSupplyCratesEnabled [get, set]
 Gets or Sets auto spawn item crates. More...
 
abstract IObjectSupplyCrate SpawnSupplyCrate (bool forceSpawn=false)
 Tries to create a new SupplyCrate in the world at a random position if it can be found. Returns null if failed.To spawn a SupplyCrate at a specific location, use Game.CreateObject("SupplyCrate00", new Vector2(x, y)); instead. More...
 
abstract IObject SpawnItemCrate (bool forceSpawn=false)
 Tries to create a new Item in the world at a random position if it can be found. Returns null if failed. This can return a SupplyCrate or StreetsweeperCrate - depending on spawn chances. To spawn a SupplyCrate at a specific location, use Game.CreateObject("SupplyCrate00", new Vector2(x, y)); instead. To spawn a StreetsweeperCrate at a specific location, use Game.CreateObject("StreetsweeperCrate", new Vector2(x, y)); instead. More...
 
abstract Dictionary< short, int > GetWeaponSpawnChances ()
 Gets all current weapon spawn chances as a dictionary. Key is the enum WeaponItem converted as short (short)WeaponItem for defined weapons. Value is the total weight (0 = none, 1-100 = spawn weight/chance). More...
 
abstract void UpdateWeaponSpawnChances (Dictionary< short, int > values)
 Update current weapon spawn chances for defined weaponitems. Example: More...
 
abstract void ClearWeaponSpawnChances ()
 Sets spawn chance to 0 for all WeaponItems. More...
 
abstract WeaponItem GetRandomWeaponItem ()
 Returns a random weapon item based on current weapon spawn chances. More...
 
abstract IObjectWeaponItem SpawnWeaponItem (WeaponItem weaponItem, Vector2 worldPosition)
 Spawns a weapon item in the world with default values and despawn time. More...
 
abstract IObjectWeaponItem SpawnWeaponItem (WeaponItem weaponItem, Vector2 worldPosition, bool enablePhysics)
 Spawns a weapon item in the world with default values and despawn time. More...
 
abstract IObjectWeaponItem SpawnWeaponItem (WeaponItem weaponItem, Vector2 worldPosition, bool enablePhysics, float despawnTime)
 Spawns a weapon item in the world with default values and despawn time. More...
 
abstract IProjectile SpawnProjectile (ProjectileItem projectileID, Vector2 worldPosition, Vector2 direction)
 Spawns a projectile in the world. Returns null if ProjectileItem.NONE is used or other non-defined enum values. More...
 
abstract IProjectile SpawnProjectile (ProjectileItem projectileID, Vector2 worldPosition, Vector2 direction, ProjectilePowerup powerup)
 Spawns a projectile in the world. Returns null if ProjectileItem.NONE is used or other non-defined enum values. More...
 
abstract IPlayer CreatePlayer (Vector2 worldPosition)
 Creates a blank player. More...
 
abstract CameraMode GetAllowedCameraModes ()
 Gets allowed camera modes. More...
 
abstract void SetAllowedCameraModes (CameraMode cameraModes)
 Sets allowed camera modes that can be toggled between. More...
 
abstract void SetCurrentCameraMode (CameraMode cameraMode)
 Sets the current camera mode to be used. This overrides allowed camera modes. More...
 
abstract Area GetCameraArea ()
 Gets the current camera area. This is the minimum allowed camera area after aspect correction and max zoom limits. More...
 
abstract Area GetCameraMaxArea ()
 Gets the current camera max area. This is the maximum possible camera area depending on users resolution. More...
 
abstract void SetCameraArea (Area area)
 Sets the world's camera area. Only applicable if there's no active CameraAreaTrigger. Too small areas will expand to be within aspect ratio and max zoom levels. More...
 
abstract void SetCameraArea (int top, int left, int bottom, int right)
 Sets the world's camera area. Only applicable if there's no active CameraAreaTrigger. Too small areas will expand to be within aspect ratio and max zoom levels. More...
 
abstract int GetWorldBottom ()
 Gets the world bottom height. More...
 
abstract void SetWorldBottom (int height)
 Sets the world bottom height. More...
 
abstract bool AutoScoreConditionEnabled [get, set]
 Gets or Sets if auto score condition is enabled. Auto score condition increases a player's score if they survive a wave in survival, progress a campaign map or is alive at the end of a round for versus/custom map types. If set to false score must be increased manually per user by using the IUser.IncreaseScore() function before the game victory text is shown (it's displayed shortly after Game.IsGameOver is true). More...
 
abstract int TotalScore [get, set]
 Gets or Sets the total score in the current map (applies to Survival type maps). More...
 
abstract void ResetScore ()
 Resets all score for current game users and total score. More...
 
abstract void TriggerExplosion (Vector2 worldPosition)
 Triggers an explosion at the given world coordinate. More...
 
abstract void TriggerFireplosion (Vector2 worldPosition, float worldRadius=10f)
 Triggers a fire "explosion" at the given world coordinate causing everything inside to be ignited. More...
 
abstract FireNode SpawnFireNode (Vector2 worldPosition, Vector2 velocity, FireNodeType fireNodeType=FireNodeType.Default)
 Spawns a fire node in the world. More...
 
abstract FireNode[] SpawnFireNodes (Vector2 worldPosition, int totalNodeCount, Vector2 baseVelocity, float expandVelocity, float randomVelocity, FireNodeType fireNodeType=FireNodeType.Default)
 Spawns several fire nodes in the world in a circle. More...
 
abstract FireNode[] SpawnFireNodes (Vector2 worldPosition, int totalNodeCount, float expandVelocity, FireNodeType fireNodeType=FireNodeType.Default)
 Spawns several fire nodes in the world in a circle. More...
 
abstract BaseObject[] GetFocusedCameraObjects ()
 Returns current objects the camera should keep focus on. Union for all PrimaryTarget, SecondaryTargets and InfoTargets from current active CameraAreaTrigger. (The final camera view depend on the end user, where he/she is and active camera mode (static/dynamic)) More...
 
abstract IDialogue CreateDialogue (string text, Vector2 worldPosition, string name="", float duration=-1, bool showInChat=true)
 Creates a new dialogue item and returns newly created dialogue. More...
 
abstract IDialogue CreateDialogue (string text, IObject targetObject, string name="", float duration=-1, bool showInChat=true)
 Creates a new dialogue item and returns newly created dialogue. More...
 
abstract IDialogue CreateDialogue (string text, Color textColor, Vector2 worldPosition, string name="", float duration=-1, bool showInChat=true)
 Creates a new dialogue item and returns newly created dialogue. More...
 
abstract IDialogue CreateDialogue (string text, Color textColor, IObject targetObject, string name="", float duration=-1, bool showInChat=true)
 Creates a new dialogue item and returns newly created dialogue. More...
 
abstract IDialogue[] GetDialogues ()
 Returns all active dialogues. More...
 
abstract RayCastResult[] RayCast (Vector2 start, Vector2 end, RayCastInput input)
 Performs a ray cast in the world. Use with care as it can get CPU intense depending on your raycast distance and how many you perform each update! Does not work with far background objects. More...
 
abstract void PlayEffect (string effectID, Vector2 worldPosition)
 Plays an effect at a specific world postion. See EffectName for available effects and possible arguments for each effect. More...
 
abstract void PlayEffect (string effectID, Vector2 worldPosition, params object[] args)
 Plays an effect at a specific world postion. See EffectName for available effects and possible arguments for each effect. More...
 
abstract void PlaySound (string soundID, Vector2 worldPosition)
 Plays a sound at a specific world position. More...
 
abstract void PlaySound (string soundID, Vector2 worldPosition, float volume)
 Plays a sound at a specific world position. More...
 
abstract void ShowPopupMessage (string message)
 Shows popup message. More...
 
abstract void ShowPopupMessage (string message, Color color)
 Shows popup message. More...
 
abstract void HidePopupMessage ()
 Hides popup message. More...
 
abstract void ShowChatMessage (string message)
 Shows a chat message to all users. More...
 
abstract void ShowChatMessage (string message, Color color)
 Shows a chat message to all users. More...
 
abstract void ShowChatMessage (string message, int userIdentifier)
 Shows a chat message to a specific user. More...
 
abstract void ShowChatMessage (string message, Color color, int userIdentifier)
 Shows a chat message to a specific user. More...
 
abstract ColorPackage GetColorPackage (string colorPackageName)
 Gets ColorPackage by name. More...
 
abstract ColorPalette GetColorPalette (string colorPaletteName)
 Gets ColorPalette by name containing all available ColorPackages. More...
 
abstract string GetClothingItemColorPaletteName (string clothingItemName)
 Returns the name of the color palette for a clothing item. More...
 
abstract string[] GetClothingItemNamesSkin (Gender gender)
 Gets available items for the skin slot. More...
 
abstract string[] GetClothingItemNamesChestUnder (Gender gender)
 Gets available items for the chest under slot. More...
 
abstract string[] GetClothingItemNamesLegs (Gender gender)
 Gets available items for the legs slot. More...
 
abstract string[] GetClothingItemNamesWaist (Gender gender)
 Gets available items for the waist slot. More...
 
abstract string[] GetClothingItemNamesFeet (Gender gender)
 Gets available items for the feet slot. More...
 
abstract string[] GetClothingItemNamesChestOver (Gender gender)
 Gets available items for the chest over slot. More...
 
abstract string[] GetClothingItemNamesAccessory (Gender gender)
 Gets available items for the accessory slot. More...
 
abstract string[] GetClothingItemNamesHands (Gender gender)
 Gets available items for the hands slot. More...
 
abstract string[] GetClothingItemNamesHead (Gender gender)
 Gets available items for the head slot. More...
 
abstract void RunCommand (string command)
 Runs a command. Only certain commands are available for maps. Extension scripts can run all existing commands. More...
 
abstract void WriteToConsole (params object[] messages)
 Writes a message out to the console and map debug options menu while testing a map in the map editor. More...
 
abstract void WriteToConsoleF (string format, params object[] args)
 Writes a message out to the console and map debug options menu while testing a map in the map editor. If the custom format fails, a default one will be used instead. More...
 
abstract IGameHelpers Helpers [get]
 Access to certain helper functions More...
 
abstract void DrawLine (Vector2 p1, Vector2 p2, Color c)
 Draws a debugging line to be shown next drawn frame. Note: You must enable "Show Script Debug Information" in the map debug options before this is shown. Note: All debug information will be accumulated until the next drawn frame is rendered, several updates can run between drawn frames. Note: Max 512 lines available in total to be drawn. More...
 
abstract void DrawLine (Vector2 p1, Vector2 p2)
 Draws a debugging line to be shown next drawn frame. Note: You must enable "Show Script Debug Information" in the map debug options before this is shown. Note: All debug information will be accumulated until the next drawn frame is rendered, several updates can run between drawn frames. Note: Max 512 lines available in total to be drawn. More...
 
abstract void DrawCircle (Vector2 center, float radius, Color c)
 Draws a debugging circle to be shown next drawn frame. Note: You must enable "Show Script Debug Information" in the map debug options before this is shown. Note: All debug information will be accumulated until the next drawn frame is rendered, several updates can run between drawn frames. Note: Max 512 circles available in total to be drawn. More...
 
abstract void DrawCircle (Vector2 center, float radius)
 Draws a debugging circle to be shown next drawn frame. Note: You must enable "Show Script Debug Information" in the map debug options before this is shown. Note: All debug information will be accumulated until the next drawn frame is rendered, several updates can run between drawn frames. Note: Max 512 circles available in total to be drawn. More...
 
abstract void DrawArea (Area area, Color c)
 Draws a debugging area to be shown next drawn frame. Note: You must enable "Show Script Debug Information" in the map debug options before this is shown. Note: All debug information will be accumulated until the next drawn frame is rendered, several updates can run between drawn frames. Note: Max 256 areas available in total to be drawn. More...
 
abstract void DrawArea (Area area)
 Draws a debugging area to be shown next drawn frame. Note: You must enable "Show Script Debug Information" in the map debug options before this is shown. Note: All debug information will be accumulated until the next drawn frame is rendered, several updates can run between drawn frames. Note: Max 256 areas available in total to be drawn. More...
 
abstract void DrawText (string text, Vector2 position, Color c)
 Draws a debugging text to be shown next drawn frame. Note: You must enable "Show Script Debug Information" in the map debug options before this is shown. Note: All debug information will be accumulated until the next drawn frame is rendered, several updates can run between drawn frames. Note: Max 128 texts available in total to be drawn. More...
 
abstract void DrawText (string text, Vector2 position)
 Draws a debugging text to be shown next drawn frame. Note: You must enable "Show Script Debug Information" in the map debug options before this is shown. Note: All debug information will be accumulated until the next drawn frame is rendered, several updates can run between drawn frames. Note: Max 128 texts available in total to be drawn. More...
 

Detailed Description

Access to certain information and functions about the currently running game world. Example:

*/
/*
 public void OnStartup() {
    // The game will always call the following method "public void OnStartup()" during a map start (or script activates). No triggers required. This is run before triggers that activate on startup (and before OnStartup triggers).
    Game.ShowPopupMessage("Hello World");
    
    // To enable an update loop you can type the following
    Events.UpdateCallback.Start(OnUpdate, 0);
 }
 
 public void AfterStartup() {
    // The game will always call the following method "public void AfterStartup()" after a map start (or script activates). No triggers required. This is run after triggers that activate on startup (and after OnStartup triggers).  
 }
  
 public void OnShutdown() {
    // The game will always call the following method "public void OnShutdown()" before a map restart (or script deactivates). Perform some cleanup here or store some final information to Game.LocalStorage if needed.
 }
  
 public void OnUpdate(float ms) {
    // Update logic here to run each update.
 }
*/
/**

Member Function Documentation

◆ ClearWeaponSpawnChances()

abstract void ClearWeaponSpawnChances ( )
pure virtual

Sets spawn chance to 0 for all WeaponItems.

◆ CreateDialogue() [1/4]

abstract IDialogue CreateDialogue ( string  text,
Color  textColor,
IObject  targetObject,
string  name = "",
float  duration = -1,
bool  showInChat = true 
)
pure virtual

Creates a new dialogue item and returns newly created dialogue.

Parameters
textText to display. Max 200 characters.
textColorText color
targetObjectTarget object to display dialogue at If null Vector2.Zero will be used.
nameName to be displayed in the chat.
durationDisplay duration. 0=infinite duration (until closed). -1=based on text length.
showInChatIf the dialogue is to be shown in the chat.

◆ CreateDialogue() [2/4]

abstract IDialogue CreateDialogue ( string  text,
Color  textColor,
Vector2  worldPosition,
string  name = "",
float  duration = -1,
bool  showInChat = true 
)
pure virtual

Creates a new dialogue item and returns newly created dialogue.

Parameters
textText to display. Max 200 characters.
textColorText color
worldPositionWorld position to display dialogue at.
nameName to be displayed in the chat.
durationDisplay duration. 0=infinite duration (until closed). -1=based on text length.
showInChatIf the dialogue is to be shown in the chat.

◆ CreateDialogue() [3/4]

abstract IDialogue CreateDialogue ( string  text,
IObject  targetObject,
string  name = "",
float  duration = -1,
bool  showInChat = true 
)
pure virtual

Creates a new dialogue item and returns newly created dialogue.

Parameters
textText to display. Max 200 characters.
targetObjectTarget object to display dialogue at If null Vector2.Zero will be used.
nameName to be displayed in the chat.
durationDisplay duration. 0=infinite duration (until closed). -1=based on text length.
showInChatIf the dialogue is to be shown in the chat.

◆ CreateDialogue() [4/4]

abstract IDialogue CreateDialogue ( string  text,
Vector2  worldPosition,
string  name = "",
float  duration = -1,
bool  showInChat = true 
)
pure virtual

Creates a new dialogue item and returns newly created dialogue.

Parameters
textText to display. Max 200 characters.
worldPositionWorld position to display dialogue at.
nameName to be displayed in the chat.
durationDisplay duration. 0=infinite duration (until closed). -1=based on text length.
showInChatIf the dialogue is to be shown in the chat.

◆ CreateObject() [1/5]

abstract IObject CreateObject ( string  objectID)
pure virtual

Creates a new object in the world.

Parameters
objectIDObject ID to be created (name as seen in the tile-list in the editor)
Returns
Object created

If the object ID doesn't exist a default object will still be created (often in the shape of a magenta square). Future content changes might rename or remove certain object IDs.

◆ CreateObject() [2/5]

abstract IObject CreateObject ( string  objectID,
Vector2  worldPosition 
)
pure virtual

Creates a new object in the world.

Parameters
objectIDObject ID to be created (name as seen in the tile-list in the editor)
worldPositionWorld position
Returns
Object created

If the object ID doesn't exist a default object will still be created (often in the shape of a magenta square). Future content changes might rename or remove certain object IDs.

◆ CreateObject() [3/5]

abstract IObject CreateObject ( string  objectID,
Vector2  worldPosition,
float  angle 
)
pure virtual

Creates a new object in the world.

Parameters
objectIDObject ID to be created (name as seen in the tile-list in the editor)
worldPositionWorld position
angleAngle in radians
Returns
Object created

If the object ID doesn't exist a default object will still be created (often in the shape of a magenta square). Future content changes might rename or remove certain object IDs.

◆ CreateObject() [4/5]

abstract IObject CreateObject ( string  objectID,
Vector2  worldPosition,
float  angle,
Vector2  linearVelocity,
float  angularVelocity 
)
pure virtual

Creates a new object in the world.

Parameters
objectIDObject ID to be created (name as seen in the tile-list in the editor)
worldPositionWorld position
angleAngle in radians
linearVelocityInitial linear velocity. Only applies to dynamic objects.
angularVelocityInitial angular velocity. Only applies to dynamic objects.
Returns
Object created

If the object ID doesn't exist a default object will still be created (often in the shape of a magenta square). Future content changes might rename or remove certain object IDs.

◆ CreateObject() [5/5]

abstract IObject CreateObject ( string  objectID,
Vector2  worldPosition,
float  angle,
Vector2  linearVelocity,
float  angularVelocity,
int  faceDirection 
)
pure virtual

Creates a new object in the world.

Parameters
objectIDObject ID to be created (name as seen in the tile-list in the editor)
worldPositionWorld position
angleAngle in radians
linearVelocityInitial linear velocity. Only applies to dynamic objects.
angularVelocityInitial angular velocity. Only applies to dynamic objects.
faceDirectionInitial face direction. Valid values are -1 (left) or 1 (right).
Returns
Object created

If the object ID doesn't exist a default object will still be created (often in the shape of a magenta square). Future content changes might rename or remove certain object IDs.

◆ CreatePlayer()

abstract IPlayer CreatePlayer ( Vector2  worldPosition)
pure virtual

Creates a blank player.

Parameters
worldPositionWorld position
Returns

◆ DrawArea() [1/2]

abstract void DrawArea ( Area  area)
pure virtual

Draws a debugging area to be shown next drawn frame. Note: You must enable "Show Script Debug Information" in the map debug options before this is shown. Note: All debug information will be accumulated until the next drawn frame is rendered, several updates can run between drawn frames. Note: Max 256 areas available in total to be drawn.

Parameters
areaArea

◆ DrawArea() [2/2]

abstract void DrawArea ( Area  area,
Color  c 
)
pure virtual

Draws a debugging area to be shown next drawn frame. Note: You must enable "Show Script Debug Information" in the map debug options before this is shown. Note: All debug information will be accumulated until the next drawn frame is rendered, several updates can run between drawn frames. Note: Max 256 areas available in total to be drawn.

Parameters
areaArea
cColor

◆ DrawCircle() [1/2]

abstract void DrawCircle ( Vector2  center,
float  radius 
)
pure virtual

Draws a debugging circle to be shown next drawn frame. Note: You must enable "Show Script Debug Information" in the map debug options before this is shown. Note: All debug information will be accumulated until the next drawn frame is rendered, several updates can run between drawn frames. Note: Max 512 circles available in total to be drawn.

Parameters
centerWorld position for the circle's center
radiusRadius

◆ DrawCircle() [2/2]

abstract void DrawCircle ( Vector2  center,
float  radius,
Color  c 
)
pure virtual

Draws a debugging circle to be shown next drawn frame. Note: You must enable "Show Script Debug Information" in the map debug options before this is shown. Note: All debug information will be accumulated until the next drawn frame is rendered, several updates can run between drawn frames. Note: Max 512 circles available in total to be drawn.

Parameters
centerWorld position for the circle's center
radiusRadius
cColor

◆ DrawLine() [1/2]

abstract void DrawLine ( Vector2  p1,
Vector2  p2 
)
pure virtual

Draws a debugging line to be shown next drawn frame. Note: You must enable "Show Script Debug Information" in the map debug options before this is shown. Note: All debug information will be accumulated until the next drawn frame is rendered, several updates can run between drawn frames. Note: Max 512 lines available in total to be drawn.

Parameters
p1World position A
p2World position B

◆ DrawLine() [2/2]

abstract void DrawLine ( Vector2  p1,
Vector2  p2,
Color  c 
)
pure virtual

Draws a debugging line to be shown next drawn frame. Note: You must enable "Show Script Debug Information" in the map debug options before this is shown. Note: All debug information will be accumulated until the next drawn frame is rendered, several updates can run between drawn frames. Note: Max 512 lines available in total to be drawn.

Parameters
p1World position A
p2World position B
cColor

◆ DrawText() [1/2]

abstract void DrawText ( string  text,
Vector2  position 
)
pure virtual

Draws a debugging text to be shown next drawn frame. Note: You must enable "Show Script Debug Information" in the map debug options before this is shown. Note: All debug information will be accumulated until the next drawn frame is rendered, several updates can run between drawn frames. Note: Max 128 texts available in total to be drawn.

Parameters
textText to be drawn. The shorter the better.
positionWorld position

◆ DrawText() [2/2]

abstract void DrawText ( string  text,
Vector2  position,
Color  c 
)
pure virtual

Draws a debugging text to be shown next drawn frame. Note: You must enable "Show Script Debug Information" in the map debug options before this is shown. Note: All debug information will be accumulated until the next drawn frame is rendered, several updates can run between drawn frames. Note: Max 128 texts available in total to be drawn.

Parameters
textText to be drawn. The shorter the better.
positionWorld position
cColor

◆ EndFireNode()

abstract void EndFireNode ( int  instanceID)
pure virtual

Ends the life of the specified fire node in the next fire update cycle.

Parameters
instanceIDFire node's instanceID

◆ ForceStartSuddenDeath()

abstract void ForceStartSuddenDeath ( int  suddenDeathTimeSeconds = 45)
pure virtual

Starts sudden death if not yet active. Sudden death means that no more crates will spawn and the time is reduced to the specified limit. Once the timer runs out and if there's no winner, everyone dies forcing a draw.

Parameters
suddenDeathTimeSecondsTime in seconds the sudden death will be. Does not override the current timer, only lowers it. Min allowed is 5 seconds, max allowed is 3600 seconds (1 hour).

◆ GetActiveUser()

abstract IUser GetActiveUser ( int  userIdentifier)
pure virtual

Gets current connected user by UserIdentifier.

Parameters
userIdentifierUserIdentifier of the user.
Returns

◆ GetActiveUsers()

abstract IUser [] GetActiveUsers ( )
pure virtual

Gets all current connected users. This returns connected users and bots set up in the lobby.

Returns

◆ GetAllowedCameraModes()

abstract CameraMode GetAllowedCameraModes ( )
pure virtual

Gets allowed camera modes.

Returns
Flags

◆ GetBurningObjects()

abstract IObject [] GetBurningObjects ( )
pure virtual

Gets all current objects on fire (where IObject.IsBurning is true). Note: The returned result is NOT ordered as burning objects get updated.

◆ GetBurningObjects< T >()

abstract T [] GetBurningObjects< T > ( )
pure virtual

Gets all current objects on fire (where IObject.IsBurning is true). Note: The returned result is NOT ordered as burning objects get updated.

Type Constraints
T :IObject 

◆ GetCameraArea()

abstract Area GetCameraArea ( )
pure virtual

Gets the current camera area. This is the minimum allowed camera area after aspect correction and max zoom limits.

Returns
Area the camera area covers

◆ GetCameraMaxArea()

abstract Area GetCameraMaxArea ( )
pure virtual

Gets the current camera max area. This is the maximum possible camera area depending on users resolution.

Returns
Area the camera area covers

◆ GetClothingItemColorPaletteName()

abstract string GetClothingItemColorPaletteName ( string  clothingItemName)
pure virtual

Returns the name of the color palette for a clothing item.

Parameters
itemNameName of the clothing item.
Returns
Name of the color palette. Empty string if not found.

◆ GetClothingItemNamesAccessory()

abstract string [] GetClothingItemNamesAccessory ( Gender  gender)
pure virtual

Gets available items for the accessory slot.

Parameters
genderGender
Returns
item names

◆ GetClothingItemNamesChestOver()

abstract string [] GetClothingItemNamesChestOver ( Gender  gender)
pure virtual

Gets available items for the chest over slot.

Parameters
genderGender
Returns
item names

◆ GetClothingItemNamesChestUnder()

abstract string [] GetClothingItemNamesChestUnder ( Gender  gender)
pure virtual

Gets available items for the chest under slot.

Parameters
genderGender
Returns
item names

◆ GetClothingItemNamesFeet()

abstract string [] GetClothingItemNamesFeet ( Gender  gender)
pure virtual

Gets available items for the feet slot.

Parameters
genderGender
Returns
item names

◆ GetClothingItemNamesHands()

abstract string [] GetClothingItemNamesHands ( Gender  gender)
pure virtual

Gets available items for the hands slot.

Parameters
genderGender
Returns
item names

◆ GetClothingItemNamesHead()

abstract string [] GetClothingItemNamesHead ( Gender  gender)
pure virtual

Gets available items for the head slot.

Parameters
genderGender
Returns
item names

◆ GetClothingItemNamesLegs()

abstract string [] GetClothingItemNamesLegs ( Gender  gender)
pure virtual

Gets available items for the legs slot.

Parameters
genderGender
Returns
item names

◆ GetClothingItemNamesSkin()

abstract string [] GetClothingItemNamesSkin ( Gender  gender)
pure virtual

Gets available items for the skin slot.

Parameters
genderGender
Returns
item names

◆ GetClothingItemNamesWaist()

abstract string [] GetClothingItemNamesWaist ( Gender  gender)
pure virtual

Gets available items for the waist slot.

Parameters
genderGender
Returns
item names

◆ GetColorPackage()

abstract ColorPackage GetColorPackage ( string  colorPackageName)
pure virtual

Gets ColorPackage by name.

Parameters
colorPackageNameName of the ColorPackage.
Returns
null if not found.

◆ GetColorPalette()

abstract ColorPalette GetColorPalette ( string  colorPaletteName)
pure virtual

Gets ColorPalette by name containing all available ColorPackages.

Parameters
colorPaletteNameName of the ColorPalette.
Returns
null if not found.

◆ GetDialogues()

abstract IDialogue [] GetDialogues ( )
pure virtual

Returns all active dialogues.

Returns
Active dialogues.

◆ GetFireNodes() [1/2]

abstract FireNode [] GetFireNodes ( )
pure virtual

Gets all current active fire nodes in the world.

Returns
FireNode[]

◆ GetFireNodes() [2/2]

abstract FireNode [] GetFireNodes ( Area  area)
pure virtual

Gets all current active fire nodes in the world in the specified area.

Parameters
areaIf the area is empty, all fire nodes in the world will be included.
Returns
FireNode[]

◆ GetFirstObject() [1/2]

abstract IObject GetFirstObject ( Area  area)
pure virtual

Gets first best object that overlap with their AABB with the given area. Does not work with far background objects.

Parameters
area
Returns
null if object not found.

◆ GetFirstObject() [2/2]

abstract IObject GetFirstObject ( string  customID)
pure virtual

Gets the first best Object with the provided custom ID.

Parameters
customIDcustom ID
Returns
null if object not found.

◆ GetFirstObject< T >() [1/2]

abstract T GetFirstObject< T > ( Area  area)
pure virtual

Gets first best object that overlap with their AABB with the given area matching the specific generic type. Does not work with far background objects.

Parameters
area
Returns
null if object not found.
Type Constraints
T :IObject 

◆ GetFirstObject< T >() [2/2]

abstract T GetFirstObject< T > ( string  customID)
pure virtual

Gets the first best Object with the provided custom ID matching the specific generic type.

Parameters
customIDcustom ID
Returns
null if object not found.
Type Constraints
T :IObject 

◆ GetFocusedCameraObjects()

abstract BaseObject [] GetFocusedCameraObjects ( )
pure virtual

Returns current objects the camera should keep focus on. Union for all PrimaryTarget, SecondaryTargets and InfoTargets from current active CameraAreaTrigger. (The final camera view depend on the end user, where he/she is and active camera mode (static/dynamic))

Returns

◆ GetMapType()

abstract MapType GetMapType ( )
pure virtual

Gets the current map type.

Returns
MapType

◆ GetMissileObjects()

abstract IObject [] GetMissileObjects ( )
pure virtual

Gets all objects currently tracked as missiles. Missile objects can collide with players and deal damage based on velocity even if collision is disabled. Normally used for smaller objects being thrown. Once the object collides with the world it will lose it's missile status.

◆ GetObject() [1/2]

abstract IObject GetObject ( int  uniqueID)
pure virtual

Gets the IObject by uniqueID.

Parameters
uniqueIDUniqueID of the IObject.
Returns
null if object not found.

◆ GetObject() [2/2]

abstract IObject GetObject ( string  customID)
pure virtual

Gets the first best Object with the provided custom ID.

Parameters
customIDcustom ID
Returns
null if object not found.

◆ GetObject< T >()

abstract T GetObject< T > ( string  customID)
pure virtual

Gets the first best Object with the provided custom ID.

Parameters
customIDcustom ID
Returns
null if object not found.
Type Constraints
T :IObject 

◆ GetObjects() [1/2]

abstract IObject [] GetObjects ( Area  area)
pure virtual

Gets all objects that overlap with their AABB with the given area. Does not work with far background objects.

Parameters
areaArea
Returns
Empty array if nothing found.

◆ GetObjects() [2/2]

abstract IObject [] GetObjects ( string  customID)
pure virtual

Gets all Objects with the provided custom ID.

Parameters
customIDcustom ID
Returns
Empty array if nothing found.

◆ GetObjects< T >() [1/3]

abstract T [] GetObjects< T > ( )
pure virtual

Gets all Objects matching the given type.

Returns
Empty array if nothing found.
Type Constraints
T :IObject 

◆ GetObjects< T >() [2/3]

abstract T [] GetObjects< T > ( Area  area)
pure virtual

Gets all objects that overlap with their AABB with the given area matching the specific generic type.

Parameters
areaArea
Returns
Empty array if nothing found.
Type Constraints
T :IObject 

◆ GetObjects< T >() [3/3]

abstract T [] GetObjects< T > ( string  customID)
pure virtual

Gets all Objects with the provided custom ID matching the specific generic type.

Parameters
customIDcustom ID
Returns
Empty array if nothing found.
Type Constraints
T :IObject 

◆ GetObjectsByArea()

abstract IObject [] GetObjectsByArea ( Area  area,
PhysicsLayer  physicsLayer = PhysicsLayer.Active 
)
pure virtual

Gets all objects that overlap with their AABB with the given area.

Parameters
areaArea
Returns
Empty array if nothing found.

◆ GetObjectsByArea< T >()

abstract T [] GetObjectsByArea< T > ( Area  area,
PhysicsLayer  physicsLayer = PhysicsLayer.Active 
)
pure virtual

Gets all objects that overlap with their AABB with the given area matching the specific generic type.

Parameters
areaArea
Returns
Empty array if nothing found.
Type Constraints
T :IObject 

◆ GetObjectsByCustomID() [1/2]

abstract IObject [] GetObjectsByCustomID ( string  customID)
pure virtual

Gets all Objects with the provided custom ID.

Parameters
customIDcustom ID
Returns
Empty array if nothing found.

◆ GetObjectsByCustomID() [2/2]

abstract IObject [] GetObjectsByCustomID ( string[]  customIDs)
pure virtual

Gets all Objects with the provided custom IDs.

Parameters
customIDsarray of custom IDs
Returns
Empty array if nothing found.

◆ GetObjectsByCustomID< T >() [1/2]

abstract T [] GetObjectsByCustomID< T > ( string  customID)
pure virtual

Gets all Objects with the provided custom ID matching the specific generic type.

Parameters
customIDcustom ID
Returns
Empty array if nothing found.
Type Constraints
T :IObject 

◆ GetObjectsByCustomID< T >() [2/2]

abstract T [] GetObjectsByCustomID< T > ( string[]  customIDs)
pure virtual

Gets all Objects with the provided custom IDs matching the specific generic type.

Parameters
customIDsarray of custom IDs
Returns
Empty array if nothing found.
Type Constraints
T :IObject 

◆ GetObjectsByName() [1/2]

abstract IObject [] GetObjectsByName ( string  name)
pure virtual

Gets all Objects matching the given tile name.

Parameters
nameobject name
Returns
Empty array if nothing found.

◆ GetObjectsByName() [2/2]

abstract IObject [] GetObjectsByName ( string[]  names)
pure virtual

Gets all Objects matching the given tile names.

Parameters
namesarray of names
Returns
Empty array if nothing found.

◆ GetPlayer()

abstract IPlayer GetPlayer ( int  uniqueID)
pure virtual

Gets the player with the given UniqueID.

Parameters
uniqueIDUniqueID of the player.
Returns
null if player not found.

◆ GetPlayers()

abstract IPlayer [] GetPlayers ( )
pure virtual

Gets all players currently spawned.

Returns
Array of players.

◆ GetProjectile()

abstract IProjectile GetProjectile ( int  projectileInstanceID)
pure virtual

Gets the projectile with the specified projectile instanceID.

Parameters
projectileInstanceIDProjectile instance ID

◆ GetProjectiles()

abstract IProjectile [] GetProjectiles ( )
pure virtual

Gets all current projectiles.

◆ GetRandomWeaponItem()

abstract WeaponItem GetRandomWeaponItem ( )
pure virtual

Returns a random weapon item based on current weapon spawn chances.

Returns
WeaponItem

◆ GetRemainingTimeLimit()

abstract TimeSpan GetRemainingTimeLimit ( )
pure virtual

Returns time limit remaining. Returns TimeSpan.Zero if TimeLimitActive is false.

Returns
TimeSpan over remaining time. TimeSpan.Zero if TimeLimitActive is false.

◆ GetSharedStorage()

abstract IScriptStorage GetSharedStorage ( string  name)
pure virtual

Gets access to a shared local storage, based on a name. Name must be valid (see parameter for more info). Calling this function the first time during a map will read the storage if it exist from file.

Note: This is a shared storage and any other script or map can also access it using the same name. Other scripts can update this data live. Storing a key-value in one frame will not guarantee it exist in the next frame, depending on what other scripts do. You are safe to write and read key-values in the same frame though.

Quirk: Getting the shared storage the first time can potentially cause the game to freeze randomly for a short period in case the end-user's disk activity is busy or currently sleeping. To avoid potential freezing problems make sure to access any shared storage you may want to access in the OnStartup() function in your script as your script and map has already been read from file a few moments ago and therefor the disk activity is ready to read again. To access it just run Game.GetSharedStorage("Abc") for example.

Parameters
nameThe name must only contain letters (and no whitespace characters) and be a valid filename and must not exceed 40 characters and be at least 3 characters long. This is case insensitive, so 'ABC', 'Abc' and 'abc' will all point to the same shared storage.
Returns
A shared IScriptStorage handle. null if name is invalid.

◆ GetSingleObjectByArea()

abstract IObject GetSingleObjectByArea ( Area  area,
PhysicsLayer  physicsLayer = PhysicsLayer.Active 
)
pure virtual

Gets the first object that overlap with its AABB with the given area.

Parameters
areaArea
Returns
null if nothing found.

◆ GetSingleObjectByArea< T >()

abstract T GetSingleObjectByArea< T > ( Area  area,
PhysicsLayer  physicsLayer = PhysicsLayer.Active 
)
pure virtual

Gets the first object that overlap with its AABB with the given area matching the specific generic type.

Parameters
areaArea
Returns
null if nothing found.
Type Constraints
T :IObject 

◆ GetSingleObjectByCustomID()

abstract IObject GetSingleObjectByCustomID ( string  customID)
pure virtual

Returns the first found object with the provided custom ID.

Parameters
customIDcustom ID
Returns
null if object not found.

◆ GetSingleObjectByCustomID< T >()

abstract T GetSingleObjectByCustomID< T > ( string  customID)
pure virtual

Returns the first found object with the provided custom ID matching the specific generic type.

Parameters
customIDcustom ID
Returns
null if object not found.
Type Constraints
T :IObject 

◆ GetStatsToKeep()

abstract StatsToKeep GetStatsToKeep ( )
pure virtual

Gets what kind of stats should be kept when progressing on the same playthrough. This only applies to survival (clearing a wave or retrying a wave) and campaign (progressing to a new map part or dying).

Returns
StatsToKeep

◆ GetTargetAIEnabledObjects()

abstract IObject [] GetTargetAIEnabledObjects ( )
pure virtual

Gets all objects currently enabled for bots to target.

◆ GetWeaponSpawnChances()

abstract Dictionary<short, int> GetWeaponSpawnChances ( )
pure virtual

Gets all current weapon spawn chances as a dictionary. Key is the enum WeaponItem converted as short (short)WeaponItem for defined weapons. Value is the total weight (0 = none, 1-100 = spawn weight/chance).

Returns
Dictionary((int)WeaponItem, int)

◆ GetWeatherType()

abstract WeatherType GetWeatherType ( )
pure virtual

Gets the current weather type.

◆ GetWorldBottom()

abstract int GetWorldBottom ( )
pure virtual

Gets the world bottom height.

Returns

◆ HidePopupMessage()

abstract void HidePopupMessage ( )
pure virtual

Hides popup message.

◆ PlayEffect() [1/2]

abstract void PlayEffect ( string  effectID,
Vector2  worldPosition 
)
pure virtual

Plays an effect at a specific world postion. See EffectName for available effects and possible arguments for each effect.

Parameters
effectIDEffect to play. See EffectName for available effects and possible arguments for each effect.
worldPositionPosition to play effect at

◆ PlayEffect() [2/2]

abstract void PlayEffect ( string  effectID,
Vector2  worldPosition,
params object[]  args 
)
pure virtual

Plays an effect at a specific world postion. See EffectName for available effects and possible arguments for each effect.

Parameters
effectIDEffect to play. See EffectName for available effects and possible arguments for each effect.
worldPositionPosition to play effect at
argsEffect arguments. See EffectName for available effects and possible arguments for each effect.

◆ PlaySound() [1/2]

abstract void PlaySound ( string  soundID,
Vector2  worldPosition 
)
pure virtual

Plays a sound at a specific world position.

Parameters
soundIDSound to play. This is the same ID as found in the sounds.sfds file (the first word in each line).
worldPositionPosition to play sound at

◆ PlaySound() [2/2]

abstract void PlaySound ( string  soundID,
Vector2  worldPosition,
float  volume 
)
pure virtual

Plays a sound at a specific world position.

Parameters
soundIDSound to play. This is the same ID as found in the sounds.sfds file (the first word in each line).
worldPositionPosition to play sound at
volumeVolume [0.0-1.0]

◆ RayCast()

abstract RayCastResult [] RayCast ( Vector2  start,
Vector2  end,
RayCastInput  input 
)
pure virtual

Performs a ray cast in the world. Use with care as it can get CPU intense depending on your raycast distance and how many you perform each update! Does not work with far background objects.

Parameters
startStart position
endEnd position
inputInput parameters
Returns
RayCastResult[] hit results based on RayCastInput data.

◆ ReplaceTextTags()

abstract string ReplaceTextTags ( string  text)
pure virtual

Replaces text tags - intended for offline maps and campaigns. Use [TEXT=language.textId] to insert text from language texts by text id (case sensitive and uses the server's language setting). Use [KEY=KEY_CODE] to insert player one's keybindings. See config.ini file for the KEY_CODE names for the keybindings.

Parameters
textText to replace tags in.
Returns
Updated text

◆ ResetScore()

abstract void ResetScore ( )
pure virtual

Resets all score for current game users and total score.

◆ RunCommand()

abstract void RunCommand ( string  command)
pure virtual

Runs a command. Only certain commands are available for maps. Extension scripts can run all existing commands.

Parameters
commandCommand to run.

◆ SetAllowedCameraModes()

abstract void SetAllowedCameraModes ( CameraMode  cameraModes)
pure virtual

Sets allowed camera modes that can be toggled between.

Parameters
cameraModesFlags

◆ SetCameraArea() [1/2]

abstract void SetCameraArea ( Area  area)
pure virtual

Sets the world's camera area. Only applicable if there's no active CameraAreaTrigger. Too small areas will expand to be within aspect ratio and max zoom levels.

Parameters
areaArea the camera area should cover

◆ SetCameraArea() [2/2]

abstract void SetCameraArea ( int  top,
int  left,
int  bottom,
int  right 
)
pure virtual

Sets the world's camera area. Only applicable if there's no active CameraAreaTrigger. Too small areas will expand to be within aspect ratio and max zoom levels.

Parameters
topTop world coordinate for the camera border
leftLeft world coordinate for the camera border
bottomBottom world coordinate for the camera border
rightRight world coordinate for the camera border

◆ SetCampaignMapPart()

abstract void SetCampaignMapPart ( int  mapPartIndex)
pure virtual

Sets the next campaign map part to the specified index. This also loads the next part instant. Assigning the same index as the current active map part index will restart the current map part, restoring the players' stats. Only works for campaign maps.

Parameters
mapPartIndexMap part index. Any negative values are ignored. Positive values are capped to the last map part index if it should exceed that value.

◆ SetChallengeTimeLimit()

abstract void SetChallengeTimeLimit ( int  seconds)
pure virtual

Sets a timeout in seconds for a challenge type map. Only works for challenge maps. The host controls the time limit in other map types (such as versus). QUIRK: To update the time limit you must first disable this (by setting 0) and in the next main update cycle set this to the new value you want to apply.

Parameters
secondsChallenge time limit in seconds. Max allowed is 10 minutes (600 seconds).

◆ SetCurrentCameraMode()

abstract void SetCurrentCameraMode ( CameraMode  cameraMode)
pure virtual

Sets the current camera mode to be used. This overrides allowed camera modes.

Parameters
cameraModeFlag

◆ SetGameOver() [1/2]

abstract void SetGameOver ( )
pure virtual

Sets the game as game over based on current map type. For Campaigns this will start the campaign all over. For Survival maps this will indicate that the current survival wave is over, if all players are dead the current wave will restart, if someone's alive it will progress. For Challenges this will end the challenge, the Game.ChallengeCompleted property determines if the challenge is completed successfully or not. ///

/*
 // Example use:
    public void OnStartup()
    {
        if (Game.GetMapType() == MapType.Challenge)
        {
            // Challenge maps have AutoVictoryConditionEnabled true by default and will play out like a versus game. 
            // Set it to false if you want to control when the user has completed the challenge.
            Game.AutoVictoryConditionEnabled = false;
        }
    }

    // Example code to trigger victory/defeat for all map types through code if you need more advanced rules than a GameOverTrigger.
    public void CheckGameOver()
    {
        switch(Game.GetMapType()) 
        {
            case MapType.Custom:
            {
                // Custom map types requires you to increase the score of the individual users
                bool victory = false;
                foreach(IUser user in Game.GetActiveUsers()) 
                {
                    IPlayer plr = user.GetPlayer();
                    if (plr != null && !plr.IsDead)
                    {
                        user.IncreaseScore();
                        victory = true;
                    }
                }
                Game.SetGameOver((victory ? "Victory!" : "Defeat"));
            }
            break;
            case MapType.Survival:
            {
                // Survival map types are automatic. Just call Game.SetGameOver(). 
                // If anyone is alive the survival will progress to the next wave.
                // If everyone is dead the survival wave will restart if any retries remains.
                Game.SetGameOver();
            }
            break;
            case MapType.Challenge:
            {
                // For challenges AutoVictoryConditionEnabled is by default true which means once every hostile enemy is dead the challenge is completed.
                // If it's false you need to set Game.ChallengeCompleted and call Game.SetGameOver() manually.
                bool victory = false;
                foreach(IUser user in Game.GetActiveUsers()) 
                {
                    IPlayer plr = user.GetPlayer();
                    if (plr != null && !plr.IsDead)
                    {
                        victory = true;
                        break;
                    }
                }
                Game.ChallengeCompleted = victory;
                Game.SetGameOver();
            }
            break;
            case MapType.Campaign:
            {
                // For campaigns you must decide when to progress to the next part, 
                // when the campaign is won or if the users need to restart the current part.
                bool victory = false;
                foreach(IUser user in Game.GetActiveUsers()) 
                {
                    IPlayer plr = user.GetPlayer();
                    if (plr != null && !plr.IsDead)
                    {
                        victory = true;
                        break;
                    }
                }

                if (!victory)
                {
                    // Restart current part again
                    Game.SetCampaignMapPart(Game.CampaignCurrentMapPartIndex);
                } 
                else 
                {
                    if ((Game.CampaignCurrentMapPartIndex + 1) == Game.CampaignTotalMapParts) 
                    {
                        // campaign won!
                        Game.SetGameOver("The End");
                    } 
                    else 
                    {
                        // Go to next part
                        Game.SetCampaignMapPart(Game.CampaignCurrentMapPartIndex + 1);
                    }
                }
            }
            break;
            case MapType.Versus:
            {
                // AutoVictoryConditionEnabled is true by default for versus maps. No need to do anything.
            }
            break;
        }
    }
*/
///

◆ SetGameOver() [2/2]

abstract void SetGameOver ( string  gameOverText)
pure virtual

Sets the game as game over and shows a custom text. For Campaigns this will start the campaign all over. For Survival maps this will indicate that the current survival wave is over, if all players are dead the current wave will restart, if someone's alive it will progress. For Challenges this will end the challenge, the Game.ChallengeCompleted property determines if the challenge is completed successfully or not.

Parameters
gameOverTextCustom game over text.

◆ SetMapType()

abstract void SetMapType ( MapType  gameType)
pure virtual

OBSOLETE. DO NOT USE. This function is kept for backwards compatibility with olders scripts using this function. This does NOT change the MapType of the map. QUIRK: Setting MapType.Custom will be the same as setting AutoVictoryConditionEnabled = false; Setting MapType.Versus will be the same as setting AutoVictoryConditionEnabled = true; Using other MapTypes will be totally ignored by this function!

Parameters
gameTypeMapType.Custom

OBSOLETE

See also
AutoVictoryConditionEnabled

◆ SetStatsToKeep()

abstract void SetStatsToKeep ( StatsToKeep  statsToKeep)
pure virtual

Sets what kind of stats should be kept when progressing on the same playthrough. This only applies to survival (clearing a wave or retrying a wave) and campaign (progressing to a new map part or dying).

Parameters
statsToKeepStatsToKeep

◆ SetWeatherType()

abstract void SetWeatherType ( WeatherType  value)
pure virtual

Sets the current weather type.

◆ SetWorldBottom()

abstract void SetWorldBottom ( int  height)
pure virtual

Sets the world bottom height.

Parameters
height

◆ ShowChatMessage() [1/4]

abstract void ShowChatMessage ( string  message)
pure virtual

Shows a chat message to all users.

Parameters
messageMessage to show. Max 400 characters.

◆ ShowChatMessage() [2/4]

abstract void ShowChatMessage ( string  message,
Color  color 
)
pure virtual

Shows a chat message to all users.

Parameters
messageMessage to show. Max 400 characters.
colorColor

◆ ShowChatMessage() [3/4]

abstract void ShowChatMessage ( string  message,
Color  color,
int  userIdentifier 
)
pure virtual

Shows a chat message to a specific user.

Parameters
messageMessage to show. Max 400 characters.
colorColor
userIdentifierUser to show message to. This is the IUser.UserIdentifier/IPlayer.UserIdentifier. If the user doesn't exist no chat message is sent.

◆ ShowChatMessage() [4/4]

abstract void ShowChatMessage ( string  message,
int  userIdentifier 
)
pure virtual

Shows a chat message to a specific user.

Parameters
messageMessage to show. Max 400 characters.
userIdentifierUser to show message to. This is the IUser.UserIdentifier/IPlayer.UserIdentifier. If the user doesn't exist no chat message is sent.

◆ ShowPopupMessage() [1/2]

abstract void ShowPopupMessage ( string  message)
pure virtual

Shows popup message.

Parameters
messageMessage to show

◆ ShowPopupMessage() [2/2]

abstract void ShowPopupMessage ( string  message,
Color  color 
)
pure virtual

Shows popup message.

Parameters
messageMessage to show
colorColor

◆ SpawnFireNode()

abstract FireNode SpawnFireNode ( Vector2  worldPosition,
Vector2  velocity,
FireNodeType  fireNodeType = FireNodeType.Default 
)
pure virtual

Spawns a fire node in the world.

Parameters
worldPositionWorld coordinate
velocityVelocity
fireNodeTypeFire node type
Returns
FireNode

◆ SpawnFireNodes() [1/2]

abstract FireNode [] SpawnFireNodes ( Vector2  worldPosition,
int  totalNodeCount,
float  expandVelocity,
FireNodeType  fireNodeType = FireNodeType.Default 
)
pure virtual

Spawns several fire nodes in the world in a circle.

Parameters
worldPositionWorld coordinate
totalNodeCountTotal fire nodes to spawn evenly spread to form a circle (molotov default: 22)
expandVelocityExpand velocity for each node in the circle (molotov default: 3f)
fireNodeTypeFire node type
Returns
FireNode[]

◆ SpawnFireNodes() [2/2]

abstract FireNode [] SpawnFireNodes ( Vector2  worldPosition,
int  totalNodeCount,
Vector2  baseVelocity,
float  expandVelocity,
float  randomVelocity,
FireNodeType  fireNodeType = FireNodeType.Default 
)
pure virtual

Spawns several fire nodes in the world in a circle.

Parameters
worldPositionWorld coordinate
totalNodeCountTotal fire nodes to spawn evenly spread to form a circle (molotov default: 22)
baseVelocityBase velocity for each node (molotov default: LinearVelocity * 0.04f)
expandVelocityExpand velocity for each node in the circle (molotov default: 3f)
randomVelocityRandom expand velocity for each node (molotov default: 0.5f)
fireNodeTypeFire node type
Returns
FireNode[]

◆ SpawnItemCrate()

abstract IObject SpawnItemCrate ( bool  forceSpawn = false)
pure virtual

Tries to create a new Item in the world at a random position if it can be found. Returns null if failed. This can return a SupplyCrate or StreetsweeperCrate - depending on spawn chances. To spawn a SupplyCrate at a specific location, use Game.CreateObject("SupplyCrate00", new Vector2(x, y)); instead. To spawn a StreetsweeperCrate at a specific location, use Game.CreateObject("StreetsweeperCrate", new Vector2(x, y)); instead.

Parameters
forceSpawnForces the crate to spawn at the last known random position even if no new random position was found.

◆ SpawnProjectile() [1/2]

abstract IProjectile SpawnProjectile ( ProjectileItem  projectileID,
Vector2  worldPosition,
Vector2  direction 
)
pure virtual

Spawns a projectile in the world. Returns null if ProjectileItem.NONE is used or other non-defined enum values.

Parameters
projectileIDProjectile to spawn. Must be correctly defined or null is returned.
worldPositionInitial position of the projectile
directionDirection of the projectile as a normalized vector

◆ SpawnProjectile() [2/2]

abstract IProjectile SpawnProjectile ( ProjectileItem  projectileID,
Vector2  worldPosition,
Vector2  direction,
ProjectilePowerup  powerup 
)
pure virtual

Spawns a projectile in the world. Returns null if ProjectileItem.NONE is used or other non-defined enum values.

Parameters
projectileIDProjectile to spawn. Must be correctly defined or null is returned.
worldPositionInitial position of the projectile
directionDirection of the projectile as a normalized vector
powerupProjectile powerup

◆ SpawnSupplyCrate()

abstract IObjectSupplyCrate SpawnSupplyCrate ( bool  forceSpawn = false)
pure virtual

Tries to create a new SupplyCrate in the world at a random position if it can be found. Returns null if failed.To spawn a SupplyCrate at a specific location, use Game.CreateObject("SupplyCrate00", new Vector2(x, y)); instead.

Parameters
forceSpawnForces the crate to spawn at the last known random position even if no new random position was found.

◆ SpawnWeaponItem() [1/3]

abstract IObjectWeaponItem SpawnWeaponItem ( WeaponItem  weaponItem,
Vector2  worldPosition 
)
pure virtual

Spawns a weapon item in the world with default values and despawn time.

Parameters
weaponItemWeaponItem to spawn
worldPositionWorld position
Returns
Created weapon item, null if weaponItem is NONE

◆ SpawnWeaponItem() [2/3]

abstract IObjectWeaponItem SpawnWeaponItem ( WeaponItem  weaponItem,
Vector2  worldPosition,
bool  enablePhysics 
)
pure virtual

Spawns a weapon item in the world with default values and despawn time.

Parameters
weaponItemWeaponItem to spawn
worldPositionWorld position
enablePhysicsIf the item should initially have physics on (true) or stay frozen the air (false)
Returns
Created weapon item, null if weaponItem is NONE

◆ SpawnWeaponItem() [3/3]

abstract IObjectWeaponItem SpawnWeaponItem ( WeaponItem  weaponItem,
Vector2  worldPosition,
bool  enablePhysics,
float  despawnTime 
)
pure virtual

Spawns a weapon item in the world with default values and despawn time.

Parameters
weaponItemWeaponItem to spawn
worldPositionWorld position
enablePhysicsIf the item should initially have physics on (true) or stay frozen the air (false)
despawnTimeDespawn time in ms. 0=No despawn time.
Returns
Created weapon item, null if weaponItem is NONE

◆ TriggerExplosion()

abstract void TriggerExplosion ( Vector2  worldPosition)
pure virtual

Triggers an explosion at the given world coordinate.

Parameters
worldPositionWorld coordinate

◆ TriggerFireplosion()

abstract void TriggerFireplosion ( Vector2  worldPosition,
float  worldRadius = 10f 
)
pure virtual

Triggers a fire "explosion" at the given world coordinate causing everything inside to be ignited.

Parameters
worldPositionWorld coordinate
worldRadiusWorld radius (molotov default: 10f)

Does not spawn fire nodes or any visual effect

◆ TryGetText() [1/2]

abstract bool TryGetText ( string  textId,
out string  value 
)
pure virtual

Gets a text by id from the language file.

Parameters
textIdTextId of the text, case sensitive
valueValue out

◆ TryGetText() [2/2]

abstract bool TryGetText ( string  textId,
out string  value,
params string[]  args 
)
pure virtual

Gets a text by id from the language file.

Parameters
textIdTextId of the text, case sensitive
valueValue out
argsParameters used by the textId. Number of arguments must match.

◆ UpdateWeaponSpawnChances()

abstract void UpdateWeaponSpawnChances ( Dictionary< short, int >  values)
pure virtual

Update current weapon spawn chances for defined weaponitems. Example:

*/
/*
 public void OnStartup() {
    Dictionary<short, int> weaponChances = new Dictionary<short, int>();
    weaponChances.Add((short)WeaponItem.PISTOL, 100);
    // Game.ClearWeaponSpawnChances(); // To clear all current weapon spawn chances first and only allow pistols to spawn!
    Game.UpdateWeaponSpawnChances(weaponChances);
 }
*/
/**
Parameters
valuesUpdates weapon spawn chances. Key is the enum WeaponItem converted as short (short)WeaponItem for defined weapons. WeaponItems not added to the dictionary will keep their current spawn chance. Value is the total weight (-1 = default, 0 = none, 1-100 = spawn weight/chance).

◆ WriteToConsole()

abstract void WriteToConsole ( params object[]  messages)
pure virtual

Writes a message out to the console and map debug options menu while testing a map in the map editor.

◆ WriteToConsoleF()

abstract void WriteToConsoleF ( string  format,
params object[]  args 
)
pure virtual

Writes a message out to the console and map debug options menu while testing a map in the map editor. If the custom format fails, a default one will be used instead.

Property Documentation

◆ AutoScoreConditionEnabled

abstract bool AutoScoreConditionEnabled
getset

Gets or Sets if auto score condition is enabled. Auto score condition increases a player's score if they survive a wave in survival, progress a campaign map or is alive at the end of a round for versus/custom map types. If set to false score must be increased manually per user by using the IUser.IncreaseScore() function before the game victory text is shown (it's displayed shortly after Game.IsGameOver is true).

◆ AutoSpawnSupplyCratesEnabled

abstract bool AutoSpawnSupplyCratesEnabled
getset

Gets or Sets auto spawn item crates.

◆ AutoVictoryConditionEnabled

abstract bool AutoVictoryConditionEnabled
getset

Gets or Sets if auto victory condition is enabled. Auto victory condition applies to Versus and Challange map types. Custom, Survival and Campaign map types must be controlled when it's GameOver via triggers or scripts.

◆ CampaignCurrentMapPartIndex

abstract int CampaignCurrentMapPartIndex
get

Gets the current map part index for a campaign. Returns -1 for non-campaign maps.

◆ CampaignTotalMapParts

abstract int CampaignTotalMapParts
get

Gets the total map parts for a campaign. Returns 0 for non-campaign maps.

◆ ChallengeCompleted

abstract bool ChallengeCompleted
getset

Gets or Sets if the challenge is completed successfully when calling SetGameOver(). This only works for Challenge type maps.

◆ CurrentDifficulty

abstract float CurrentDifficulty
get

Gets the current difficulty based on map mode, players and progress in range [0.0-1.0]. Survival maps returns current players / total players. Campaigns maps returns 0.25 for easy, 0.5 for normal, 0.75 for hard and 1.0 for expert. Other maps return 1.0.

◆ Data

abstract string Data
getset

Use the SessionStroage or LocalStorage instead. This property is kept for backwards compatibility.

Gets or Sets the session data string that is maintained between games for individual level scripts or extension scripts. This is reset when the server changes to a different map or the server restarts.

◆ DeathSequenceEnabled

abstract bool DeathSequenceEnabled
getset

Gets or Sets if the death sequence of the map is enabled. The death sequence will show a text "YOU ARE DEAD" + play sound.

◆ Helpers

abstract IGameHelpers Helpers
get

Access to certain helper functions

◆ IsEditorTest

abstract bool IsEditorTest
get

Gets if this is run in the editor while testing a map. Useful if you want to enable (or disable) certain features for testing only.

◆ IsFirstUpdate

abstract bool IsFirstUpdate
get

Gets if the code is executing during the first update.

◆ IsGameOver

abstract bool IsGameOver
get

Checks if the game is over

◆ LocalStorage

abstract IScriptStorage LocalStorage
get

Gets access to local storage. This storage is permanent between server restarts and between different played levels. Data is stored based on the current map/script's file path. Quirk: You're limited to a practical max storage limit to about 10 MB file sizes. Quirk: Changing the filename or placing the script in another folder will change the file path for the stored data. Quirk: You must test on a saved map for this to save data between runs in the map editor.

◆ MapAuthor

abstract string MapAuthor
get

Gets the author of the map.

◆ MapGUID

abstract Guid MapGUID
get

Gets the last saved GUID of the map, when the map was last updated.

◆ MapName

abstract string MapName
get

Gets the name of the map.

◆ MapOriginalGUID

abstract Guid MapOriginalGUID
get

Gets the original GUID of the map, when the map was first created.

◆ MapRound

abstract int MapRound
get

Gets the current map round while playing the same map - resets on map change. Starts on 1 and increment for each round while playing the same map.

◆ MapTotalPlayers

abstract int MapTotalPlayers
get

Gets the number of total players defined by the map. Only available for campaigns and survival type maps. Returns 0 if not set.

◆ SelectedDifficultyLevel

abstract DifficultyLevel SelectedDifficultyLevel
get

Gets the selected difficulty level in the current map. Only applicable for campaign maps where this will return the selected difficulty choosen by the host. Any other map will return DifficultyLevel.None and CurrentDifficulty 1.0.

◆ SessionStorage

abstract IScriptStorage SessionStorage
get

Gets access to session storage. This storage is maintained between games for individual level scripts or extension scripts. This is reset when the server changes to a different map or the server restarts. For permanent storage use LocalStorage instead.

◆ SlowmotionModifier

abstract float SlowmotionModifier
get

Gets the slowmotion/time modifier in the game affected by slowmotion items and /settime command.

◆ StartupSequenceEnabled

abstract bool StartupSequenceEnabled
getset

Gets or Sets if the startup sequence of the map is enabled. The startup sequence will show GET READY and FIGHT text + play sound.

◆ StatsToKeepEnabled

abstract bool StatsToKeepEnabled
getset

Gets or Sets if stats should be kept when progressing on the same playthrough. This only applies to survival (clearing a wave or retrying a wave) and campaign (progressing to a new map part or dying).

◆ SuddenDeathActive

abstract bool SuddenDeathActive
get

Gets if sudden death is currently active.

◆ SuddenDeathEnabled

abstract bool SuddenDeathEnabled
get

Gets if sudden death is enabled.

◆ SurvivalExtraLives

abstract int SurvivalExtraLives
getset

Gets or Sets current survival extra lives for survival type maps - resets on map change/restart.

◆ SurvivalWave

abstract int SurvivalWave
get

Gets the current survival wave while playing the same map - resets on map change/restart. Starts on 1 and increment for each survival wave finished.

◆ SurvivalWaveCompleted

abstract bool SurvivalWaveCompleted
get

Gets if current survival wave is completed. Only updated after IsGameOver is true. This property returns false if all survivors are dead.

◆ TimeLimit

abstract int TimeLimit
get

Gets the total time limit in the game in seconds. Returns 0 if TimeLimitActive is false. Use GetRemainingTimeLimit() to get the remaining time.

◆ TimeLimitActive

abstract bool TimeLimitActive
get

Gets if time limit is active and ticking. Remaining time can be retrieved via GetTimeLimitRemaining().

◆ TotalElapsedGameTime

abstract float TotalElapsedGameTime
get

Gets the total elapsed game-time, affected by slowmotion, in milliseconds since the game started.

◆ TotalElapsedRealTime

abstract float TotalElapsedRealTime
get

Gets the total elapsed real-time in milliseconds since the game start.

◆ TotalScore

abstract int TotalScore
getset

Gets or Sets the total score in the current map (applies to Survival type maps).