Editor

Overview

This page will help you make the most of the in-game Editor in Deadswitch Combat.

Updated @ Sept 13, 2026

Useful Links

Players

A player is a human or bot. A player can have an associated game object, but not always. For example, when a player is killed in a Team Deathmatch game, they do not have a game object, but are still present in the game.

Bots can exist in the game, but an NPC game object doesn’t always have a player owner. For example, the zombies in Zombie Survival.

Game players are shown in the Scoreboard (press Tab in-game).

A game object that is controlled by a player is referred to as a pawn. You may see pawnId referenced.

Game Objects

A game object is something that exists in the world, like a character, crate, vehicle, or grenade.

Every game object has an ID (identifier), position, and data properties.

Object
   |-- id
   |-- position
      |-- x
      |-- y
   |-- data
      |-- health
      |-- name
      |-- etc...

Data properties are dependent on the object itself.

Objects with a physics body also have a velocity value. Note: Decorations never have a physics body!

If a game object is controlled by a player, its ID will match the player ID.

Triggers

Special Values

You can use special values with triggers. Special values let you insert dynamic data instead of a fixed value.

A special value is written inside curly braces, for example:

{event.id}

This tells the game to use the current value of event.id.

Using Game Values

You can access values using their path. Specify a path by using a period (.).

{objects.player.data.health}

In this case, the value here will be the health of the object with the ID player (eg 100).

Dynamic IDs and Nested Values

You can use another special value to determine which object to access.

{objects.{event.pawnId}.data.name}

If:

event.pawnId = abcd

The game will look for:

game.objects.abcd.data.name

And return that value. In this case, it would be the object’s name, eg Alpha Juggernaut.

Doing Math

Special values can also perform simple math calculations.

  • + Addition
  • - Subtraction
  • * Multiplication
{event.score + 10}
{objects.{event.id}.data.health - 25}
{event.damage * 2}
{event.score + 10 * 2}

Standard order of operations apply (BEDMAS).

Default Values and Fallbacks

You can provide a fallback value using ||.

This is useful when a value might not exist.

{event.health || 100}

This means:

  • Use event.health if it has a value. Otherwise, use 100

This is particularly useful if an object’s position may not exist (eg the object has been killed). Attempting to use its X and Y values will result in undefined which may cause bugs, so using a fallback value is safer.

You can use multiple fallbacks as needed:

{event.health || vars.defaultHealth || 100}

The fallback value treats these values as non-existant:

  • undefined
  • null
  • false
  • 0
  • "" (Empty string)
  • NaN
Random Numbers

You can generate random numbers using random and randomInt:

{random} - Random decimal between 0 and 1
Example result: 0.738291

You can include a maximum:

{random:100} - Random decimal between 0 and 100
Example result: 42.718

You can specify both a minimum and maximum:

{random:10,50} - Random decimal between 10 and 50

Use randomInt to generate a random integer (whole number):

{randomInt}
{randomInt:100}
{randomInt:10,50}
Using Special Values With Text

Special values don’t have to be used by themselves. You can place them inside normal text:

"{objects.{event.id}.data.name} has {objects.{event.id}.data.health} health."

This could produce:

Peacekeeper has 100 health.
Available Values
{game}Top-level game state
You can access anything from here, for example:
{game.gameModeId}
{game.settings.timeLimit}
{game.gameTimer}
{game.difficulty}
{game.bMultiplayer}
{objects}All game objects
{objects.enemy.data.health}
{vars}Custom variables
Set by GameEvent.SetVar
{player}The first player
This is the same as doing {game.players.0}
Remember, multiplayer games have more than one player!
{players}Players indexed by ID
{players.{event.id}.name}
{game.players}Players (array)
{game.players.1.name}
{objectives}Current game objectives
Created by GameModeEvent.AddObjective
{teams}Living objects grouped by team (array)
{teams.1.length}
{trigger}Current event trigger
{action}Current action being processed
{event}Current event data

Players vs Game Objects

Be sure to understand the difference between a player and a game object as described above.

A player does not always have an actual game object in the world, and a game object does not always have a player owner.

{players.{event.id}.data.health} - Data does NOT exist here!
{objects.{event.id}.data.health} - This is correct

Examples

You can open any existing Operation in the Editor to use as a reference.

Check the assets/json/operations folder for the official Operation files.