Skip to main content
Version: Beta-1.15

Script commands

Script commands are used to change objects' properties, which are somehow connected with the script.

Contents

Drill

Command drill sets or removes a script responsible for drilling. Asteroids, walls and spheres have it attached by default. You can overwrite the script.

drill set <type>
drill remove

Asteroid

Command asteroid changes different asteroid properties. You can hide it, show it or prevent players from changing objects on it.

asteroid hide
asteroid show
asteroid blocker enable
asteroid blocker disable

Note: Hiding an asteroid disables its Renderer and Collider components, but don't affect objects on it.
Note: Asteroid blocker doesn't prevent objects from growing.

State based movement

The state based movement feature consists of three commands. It allows you to move your objects during gameplay depending on the selected structure state.

Extension

Command extension allows you to customize extending movement of the selected object. Extending is an animation, which changes X and Y position in a specified time.

extension <X> <Y> <time>
  • X: Horizontal position change.
  • Y: Vertical position change.
  • Time: Animation duration in Unity frames (0.02s). Select 1 for instant jump.

Hidesmooth

Command hidesmooth allows you to customize hiding movement of the selected object. Hiding is an animation, which changes scale of an object and moves it into a deep darkness of the space in a specified time.

hidesmooth <Z> <time>
  • Z: Object hiding distance from layer 0.
  • Time: Animation duration in Unity frames (0.02s). Select 1 for instant jump.

Note: Never assign hide component to a second level parent of an asteroid.
Note: It's recommended to not set absolute Z values to over 100.

List

Command list allows you to choose animation states of extending or hiding movements depending on the selected structure state. Every structure state implies undone state by default.

Available animation states:

  • undone
  • doing
  • done
  • undoing
list <movement> <animation> <states>
  • Movement: Movement type: [extended, hidden].
  • Animation: Animation state, when one of the selected structure states is active: [undone, doing, done, undoing].
  • States: Array of structure states separated by , in which the current animation state will be active.

Note: Selecting state undone is useless, but you can do it to save a clean code or to overwrite other states.

Structure states

Every structure has a state string. It determines, what's happening with that structure. That string might be changed during gameplay, but only if a structure homes a state-changing object (for example boss).

general IDadditional IDStateDescriptionState changing object
--defaultNo state was confirmed or structure is loading.-
00A1Peace before wave 1.Boss
10A2Peace before wave 2.Boss
20A3Peace before wave 3.Boss
30RBoss defeated, rewards available.Boss
02B1Fighting in wave 1.Boss
12B2Fighting in wave 2.Boss
22B3Fighting in wave 3.Boss
01a1b1Switching to wave 1.Boss
11a2b2Switching to wave 2.Boss
21a3b3Switching to wave 3.Boss
03b1a1Losing in wave 1.Boss
13b2a2Losing in wave 2.Boss
23b3a3Losing in wave 3.Boss
14b1a2Winning in wave 1.Boss
24b2a3Winning in wave 2.Boss
34b3rWinning in wave 3.Boss

Bosbul add

Command bosbul add assigns a bosbul object to an asteroid, a sphere or a wall if the current variable is pointing at this. You don't have to worry about ID of a new bosbul object, because it's inaccessible from the seon level. To use that command just type bosbul add.

bosbul add

Note: Bosbul object is static even if you use on it state changing movement.

Usage examples

summon #0 boss 2
summon #1 sphere 10 1 move 0 15
drill set 6

summon #2 asteroid 9 0 8;9;8;9;8;9;8;9;8;9;8;9;8;9;8;9;8;9 move 0 -15
asteroid blocker enable
asteroid hide
bosbul add

catch #1
extension 0 5 40
hidesmooth 80 40
list extended done default,B1,B2,B3
list hidden doing a1b1,a2b2,a3b3