Internal variables

Besides the variables you create, the game gives you these. You pick them in variable boxes like any other and see them in the Variables tab of the circuits menu.

Object

VariableWhat it is
~chest.available_amountread-onlysmartWhat the chest holds: the balance in the Gold chest and the Silver chest, or the number of objects in the Object chest. It only appears on those three chests. Example: open a door when the gold chest goes over 10,000.
~chest.capacityread-onlysmartHow much the chest can hold. It only appears on circuits chests (Object chest, Gold chest, Silver chest). Example: compare it with “~chest.available_amount” to warn when it's almost full.
~chest.is_auto_lockno value (exists or not)smartExists if the chest has auto-lock turned on. Only on circuits chests. Use it with Condition: Has variable to check.
~chest.is_donatableno value (exists or not)smartExists if anyone can donate to the chest. Only on circuits chests. Example: show a “donations open” message only when it has it.
~chest.is_openno value (exists or not)smartExists while the chest looks open in the zone (someone is using it). Only on circuits chests.
~chest.lockedno value (exists or not)smartExists if the chest is locked. A chest is locked when you place it, and then it can't be used in circuits. Only on circuits chests.
~clock.is_game_awareno value (exists or not)smartMeans the clock runs a game. It only appears on the Circuits clock, which always has it.
~clock.pulse_countwritablesmartThe Circuits clock time in half-second pulses (1 minute = 120). Changing it changes what the clock shows, but doesn't start or stop it. It only appears on the clock.
~clock.stateread-onlysmartWhether the Circuits clock is stopped, running or paused. It's read-only: to start or stop it, use Effect: Control clock. It only appears on the clock.
Named values
  • 0 Initial (at 00:00)
  • 1 Running
  • 2 Paused
~teleport.target_idwritablesmartThe id of the teleporter it's paired with. It appears on teleporters (the password one too) and on the Room link. Changing it pairs it with another one in the zone, with the same owner and of the same type, and the two old partners get paired with each other.
@idread-onlyThis object's unique number. Two identical objects have different ids. Example: store it in a variable to know which object someone stepped on.
@class_idread-onlyThe object type number: all identical objects from the shop share it. Example: check whether the pushed object is a ball, no matter which one.
@heightread-onlyThe object's height, in hundredths. Only objects with levels (BBox and circuits boxes) have height, and they measure 100; everything else is 0.
@statewritableThe object's state (0, 1, 2…). Only dice, roulettes and the Circuits clock have states. From a circuit, a state that doesn't exist goes back to 0, so “+1” moves to the next one. On the clock it's read-only.
@position.xwritableThe X tile the object is on. Changing it moves the object just like Effect: Move and rotate object (if the tile isn't valid, it stays put).
@position.ywritableThe Y tile the object is on. Changing it moves the object just like Effect: Move and rotate object.
@rotationwritableWhich way the object faces. In BoomBang, objects that can be turned have two orientations: 0 and 1. Changing it turns the object.
@altitudewritableThe object's altitude, in hundredths. In BoomBang only BBox and circuits boxes have altitude (it's their level); everything else is at 0.
@is_invisibleno value (exists or not)Exists if the object is hidden by the Invisibility control. The owner and people with rights can still see it, but for the variable it's hidden.
@positionwritableThe tile as a single number: X × 256 + Y. Handy to check in one go whether two things are on the same tile. Changing it moves the object.
@occupationwritableTile and rotation as a single number: X × 65536 + Y × 256 + rotation. Changing it moves and turns the object at once.
@is_stackableno value (exists or not)Exists if things can be stacked on the object, that is, if it has levels (BBox and circuits boxes).
@can_stand_onno value (exists or not)Exists if the object can be walked on (it doesn't block its tile). Example: with Condition: Has variable, let a circuit move only walkable objects.
@dimensions.xread-onlyHow many tiles the object takes up across (X axis).
@dimensions.yread-onlyHow many tiles the object takes up lengthwise (Y axis).
@owner_idread-onlyThe account id of the object's owner. Example: compare it with “@user_id” to know whether the person who clicked owns it.
@projectile.animation.tiles_travelledread-onlyHow many tiles the object covered on its last flight with Addon: Projectile. It only exists if you ticked this variable in the addon and the object has already flown; it keeps the value until the object moves again.
@projectile.animation.user_collisionsread-onlyHow many kekos the object hit on its last flight with Addon: Projectile. Example: give the team points for each keko hit.
@projectile.animation.furni_collisionsread-onlyHow many objects it hit on its last flight with Addon: Projectile.
@projectile.animation.position.xread-onlyThe X tile where the last flight with Addon: Projectile ended (or currently is).
@projectile.animation.position.yread-onlyThe Y tile where the last flight with Addon: Projectile ended (or currently is).
@projectile.animation.position.altituderead-onlyThe altitude, in hundredths, where the last flight with Addon: Projectile ended (or currently is).
@projectile.animation.is_travellingno value (exists or not)Exists while the object is flying with Addon: Projectile and disappears when it lands. Example: with Condition: Does not have variable, don't launch an object that's still flying.
@opacityread-onlyThe object's opacity (0 to 100) set by Effect: Change opacity for everyone in the zone; untouched it's 100. It's read-only: use the effect to change it.

User

VariableWhat it is
@indexread-onlyThe keko's number inside the zone. It changes every time they come in, so it's not useful to recognize them later: use “@user_id” for that.
@typeread-onlyWhether it's a real keko or an island bot. Example: keep a welcome circuit from greeting bots.
Named values
  • 1 User (keko)
  • 4 Bot
@achievement_scoreread-onlyThe achievement points on the keko's profile (the sum of their unlocked achievements). Bots have 0. Example: only let in players with 500 points or more.
@is_hcno value (exists or not)Exists if the keko is VIP. Example: with Condition: Has variable, open an area for VIP players only.
@has_rightsno value (exists or not)Exists if the keko has rights on the island: the owner and anyone on their whitelist.
@is_group_adminno value (exists or not)Exists if the keko is the leader or a co-leader of the island owner's clan.
@is_ownerno value (exists or not)Exists if the keko is the island owner. Example: a button that only works for you.
@position.xwritableThe X tile the keko is on. Changing it moves the keko to that tile (if it isn't valid, they stay put).
@position.ywritableThe Y tile the keko is on. Changing it moves the keko to that tile.
@directionwritableWhich way the keko faces, from 0 to 7. Changing it turns the keko. Example: make everyone face the stage when the show starts.
Named values
  • 0 N (north)
  • 1 NE (northeast)
  • 2 E (east)
  • 3 SE (southeast)
  • 4 S (south)
  • 5 SW (southwest)
  • 6 W (west)
  • 7 NW (northwest)
@altituderead-onlyThe keko's altitude, in hundredths. Kekos walk on the floor, so it's normally 0.
@team.scorewritableThe points of the keko's team (the same number as “@teams.<color>.score”). It only exists if the keko is on a team, and it can only be changed while a game is running.
@team.colorread-onlyThe color of the keko's team. It only exists if they joined a team with Effect: Join team. Example: send each team to its base by color.
Named values
  • 1 Red
  • 2 Green
  • 3 Blue
  • 4 Yellow
@team.typeread-onlyThe team's game type. In BoomBang teams are always circuits teams, so it's 4. It only exists if the keko is on a team.
Named values
  • 4 Circuits
@effectwritableThe number of the potion the keko has on; with no potion, they don't have it. You can give, change or remove it: a circuit never changes or removes a bought potion, and the one it gives lasts while the keko stays in the zone.
@is_frozenno value (exists or not)Exists while the keko is frozen with Effect: Freeze user. Example: with Condition: Does not have variable, only let unfrozen players roll the dice.
@is_tradingno value (exists or not)Exists while the keko has a trade open.
@favourite_group_idread-onlyThe id of the keko's clan. With no clan, they don't have it. Example: compare it with “@group_id” to know whether they're in the owner's clan.
@is_idleno value (exists or not)Exists while the keko is asleep (after 3 minutes without doing anything). Example: remove sleeping players from the game.
@user_idread-onlyThe keko's account id. It never changes, so it's the safe way to recognize someone. Bots don't have it.
@bot_idread-onlyThe island bot's id. Only bots have it. Example: tell which of your bots a keko reached.
@transaction.in_tradeno value (exists or not)Exists while the keko has a circuits transaction open (the one started by Effect: Start transaction).
@transaction.start_timeread-onlyWhen their circuits transaction started, in seconds since 1970. It only exists with a transaction open.
@transaction.contract_idread-onlyThe id of the contract in their open transaction (Payment contract, Trade contract, Reward contract or Addon: Contract).
@transaction.stateread-onlyWhich step their circuits transaction is at: still adding what they offer, or already confirmed.
Named values
  • 1 Adding items
  • 2 Confirmed
@transaction.can_acceptno value (exists or not)Exists when what the keko offered meets what the contract asks for (it can be accepted).
@transaction.current_multiplierread-onlyHow many times what they offered meets the contract right now (in a normal contract, 1).

Zone

VariableWhat it is
@furni_countread-onlyHow many objects are placed in the zone (hidden ones count too).
@user_countread-onlyHow many kekos are in the zone, not counting bots. Example: start the game when there are 4 or more.
@circuit_timerread-onlyThe zone's circuits timer, in half-second pulses. Effect: Reset timers sets it back to 0.
@teams.red.scorewritableThe red team's points. They can only be changed while a game is running; a new game resets them to 0.
@teams.green.scorewritableThe green team's points. They can only be changed while a game is running.
@teams.blue.scorewritableThe blue team's points. They can only be changed while a game is running.
@teams.yellow.scorewritableThe yellow team's points. They can only be changed while a game is running.
@teams.red.sizeread-onlyHow many kekos are on the red team. Example: don't let anyone else join once there are 5.
@teams.green.sizeread-onlyHow many kekos are on the green team.
@teams.blue.sizeread-onlyHow many kekos are on the blue team.
@teams.yellow.sizeread-onlyHow many kekos are on the yellow team.
@room_idread-onlyThis zone's id, the island zone the circuit is in. Example: show it in a message with Addon: Variable value in text.
@group_idread-onlyThe id of the island owner's clan; 0 if they have no clan.
@current_timeread-onlyThe current moment, in milliseconds since 1970. It's so big that it shows as hidden in the inspection; you can see it whole in a message with Addon: Variable value in text.
@current_time.milliseconds_of_secondsread-onlyThe milliseconds of the current second (0 to 999).
@current_time.seconds_of_minuteread-onlyThe seconds of the current minute (0 to 59).
@current_time.minute_of_hourread-onlyThe minute of the current hour (0 to 59).
@current_time.hour_of_dayread-onlyThe hour of the day (0 to 23), in the zone's time zone. Example: open the club only from 20 to 23.
@current_time.day_of_weekread-onlyThe day of the week, from 1 (Monday) to 7 (Sunday). Example: a double prize on Saturdays only.
Named values
  • 1 Monday
  • 2 Tuesday
  • 3 Wednesday
  • 4 Thursday
  • 5 Friday
  • 6 Saturday
  • 7 Sunday
@current_time.day_of_monthread-onlyThe day of the month (1 to 31).
@current_time.day_of_yearread-onlyThe day of the year (1 to 366).
@current_time.week_of_yearread-onlyThe week of the year (1 to 53).
@current_time.month_of_yearread-onlyThe month, from 1 (January) to 12 (December). Example: decorate the zone in October only.
Named values
  • 1 January
  • 2 February
  • 3 March
  • 4 April
  • 5 May
  • 6 June
  • 7 July
  • 8 August
  • 9 September
  • 10 October
  • 11 November
  • 12 December
@current_time.yearread-onlyThe current year.

Context (one run)

VariableWhat it is
@selector_furni_countread-onlyHow many objects this stack's selectors picked. Example: if they picked none, announce that nothing is left.
@selector_user_countread-onlyHow many kekos this stack's selectors picked.
@signal_furni_countread-onlyHow many objects came with the signal that ran this stack (Trigger: Receive signal).
@signal_user_countread-onlyHow many kekos came with the signal that ran this stack (Trigger: Receive signal).
@event.signal.antenna_idread-onlyThe id of the Circuits antenna the signal came through. It only exists when a signal ran the stack.
@event.chat.typeread-onlyHow the message that fired Trigger: Say something was said: talking or shouting. It only exists in stacks run by that trigger.
Named values
  • 0 Talk
  • 1 Shout
@event.chat.styleread-onlyThe bubble of the message that fired Trigger: Say something: the normal one from kekos or the one from bots. Example: keep a circuit from answering what bots say.
Named values
  • 0 Normal (said by a keko)
  • 2 Robot (said by a bot)
@event.variable_update.box_idread-onlyThe id of the variable box whose variable changed and fired Trigger: Variable changes.
@event.variable_update.change_typeread-onlyWhat happened to the variable that fired Trigger: Variable changes: it was created, its value changed, or it was removed.
Named values
  • 0 Created
  • 1 Value changed
  • 2 Deleted
@event.variable_update.old_valueread-onlyThe value the variable had before the change that fired Trigger: Variable changes.
@event.variable_update.new_valueread-onlyThe new value of the variable that fired Trigger: Variable changes.
@event.variable_update.differenceread-onlyHow much the variable changed (new minus old). Example: show “+5” or “-3” in a message.
@event.variable_update.change_originread-onlyWhere the change that fired Trigger: Variable changes came from: a circuit in this zone, another zone (through a shared variable) or someone who edited it by hand in the inspection.
Named values
  • 0 In this zone
  • 1 Another zone
  • 2 Inspection
  • 3 External
@event.transaction_complete.multiplierread-onlyHow many times the contract was met in the transaction that fired Trigger: Transaction completed.
@event.transaction_complete.deposit.furni_countread-onlyHow many objects went into the chests in the transaction that fired Trigger: Transaction completed.
@event.transaction_complete.deposit.coins_countread-onlyHow much gold (in sacks and ingots) went into the chests in the transaction that fired Trigger: Transaction completed.
@event.transaction_complete.withdrawal.furni_countread-onlyHow many objects came out of the chests as a reward in the transaction that fired Trigger: Transaction completed.
@event.transaction_complete.withdrawal.coins_countread-onlyHow much gold came out of the chests as a reward in the transaction that fired Trigger: Transaction completed.
@event.transaction_failed.reasonread-onlyWhy the transaction that fired Trigger: Transaction failed failed. Example: with the variable text connector addon (Addon: Variable text connector) show the player the reason in words.
Named values
  • 0 Cancelled by the player
  • 1 Invalid trade
  • 2 Timed out
  • 3 Cancelled by a circuit
  • 4 Already trading
  • 5 Circuit set up wrong
  • 6 Not enough to pay
  • 7 What was offered is gone
  • 8 The keko can't trade
  • 9 The chest owner can't trade
  • 10 Empty transaction
  • 12 Feature turned off
  • 13 The chest isn't in the zone
  • 14 Too many chests
  • 15 No circuits chests, or they're locked
  • 16 Can't give everything to several kekos
  • 17 Circuit trade limit
  • 18 Too many attempts in a row
  • 19 The chest is full
  • 20 Invalid multiplier
  • 21 Too many contracts or none
  • 22 No kekos
  • 23 Invalid time limit
  • 24 Outdated game version
  • 25 The keko left the zone
@event.transaction_complete.deposit.emeralds_countread-onlyHow much silver (in sacks and ingots) went into the chests in the transaction that fired Trigger: Transaction completed.
@event.transaction_complete.withdrawal.emeralds_countread-onlyHow much silver came out of the chests as a reward in the transaction that fired Trigger: Transaction completed.

No effect in BoomBang

They exist so the boxes work, but in BoomBang they always have the same value or aren't shown.

VariableWhat it is
@typeread-onlyThe object's ownership type. In BoomBang every object is a normal one, so it's always 0.
@can_sit_onno value (exists or not)Would exist if the object were a seat. BoomBang has no seats, so no object has it.
@can_lay_onno value (exists or not)Would exist if the object were a bed. BoomBang has no beds, so no object has it.
@wallitem_offsetwritableIt's for wall objects, and BoomBang has no wall objects: no object has it.
@genderread-onlyThe avatar's gender. BoomBang has no gender, so it's the same (0) for everybody.
@handitemwritableThe item held in the hand. BoomBang has no hand items: you can give and change it, but nothing shows.
@dancewritableThe keko's dance. BoomBang has no dances: you can give and change it, but nothing shows.
@signread-onlyThe sign the keko is holding up. BoomBang has no signs, so nobody has it.
@room_entry.methodread-onlyHow the keko came into the zone. For now in BoomBang it's always 0 (came in normally).
@room_entry.teleport_idread-onlyThe teleporter the keko arrived through. For now BoomBang doesn't record it, so nobody has it.
@pet_idread-onlyA pet's id. BoomBang has no pets, so nobody has it.