📖 Wall Plast Documentation

Complete guide to the game scripting language

Language Syntax

The programming language has a simple and intuitive syntax. The syntax is as follows: first comes a command (case doesn't matter), and parameters are separated by underscores _.

Example of a basic command: Log_"Hello world!"

Here Log is the command, and "Hello world!" is the parameter

Basic syntax rules:

  • Command name is case-insensitive (Log, log, LOG - all work the same)
  • Parameters are separated by underscores _
  • Text parameters are usually written in quotes for clarity to the script
  • Multiple commands are separated by ; for sequential execution
Executing multiple commands in sequence: SetActive_"Block"_false; Log_"block hidden";

SetActive executes first, then Log. This way you can combine command execution across multiple lines.

Math in Scripts

The language supports mathematical calculations and lets you compute values right in the code. Supported operators: + (addition), - (subtraction), * (multiplication), / (division).

Examples of math operations: Wait_2+2; transform_"Block"_position_y = 10 * 5; player_target_activated_moveSpeed *= 2;

Script waits 4 seconds, teleports block to height 50, doubles player speed

Assignment operators:

When you change values (position, text, etc), you can use different operators:

  • = - set exact value
  • += - add to current value
  • -= - subtract from current value
  • *= - multiply current value
  • /= - divide current value

Working with text (concatenation):

Text values can be "concatenated" using +. This lets you combine text strings and variable values:

Examples of text operations: text_"Sign" = "Level: " + 5; text_"Status" = "Player: " + "Alice"; local_Message = "HP: " + player_target_activated_hp;

Plate Events

Scripts are attached to specific plate events. It's important to understand when each one triggers. The event determines the moment and conditions when your script will execute.

Event Description
Start Executes exactly once when you start the map test. If you return to build mode and start the test again, the script executes again. Perfect for initializing variables and initial setup.
Update This script runs constantly and continuously throughout the game, executing every frame. Great for constant state checks or continuous object movement.
OnPress Triggers exactly ONCE the moment when a player (or multiple) steps on the plate and it depresses. If OnRelease or WhileNotPressed scripts are running at this time, they are immediately interrupted (stopped) to not interfere with press logic.
WhilePressed Executes continuously in a loop all the time someone is on the plate. Triggers right after OnPress and continues until OnRelease.
OnRelease Triggers exactly ONCE when the plate returns to its original (depressed) state and all players have left it. At this point, OnPress and WhilePressed scripts are immediately stopped.
WhileNotPressed Executes continuously in a loop all the time no one is on the plate. Triggers after OnRelease.
Important note: All running events and loops are forcefully interrupted when you enable build mode so you can quietly edit the map without script interference.

Event execution logic:

Start ➜ Update (continuous) ↓ Player pressed ➜ OnPress (once) ➜ WhilePressed (continuous) ↓ Player left ➜ OnRelease (once) ➜ WhileNotPressed (continuous)

Coordinates and Vectors (Vector3)

To manage objects in three-dimensional space (position, size, rotation), use the vector concept Vector3_X_Y_Z, where X, Y, Z are numbers, variable values, or mathematical expressions. X is horizontal position (left-right), Y is vertical position (up-down), Z is depth (forward-backward).

Creating a vector: Vector3_10_5_1.5

Where X=10, Y=5, Z=1.5

Applying a vector to an object:

You can apply the entire vector to an object to change all coordinates simultaneously:

Teleporting a block: transform_"Block"_position = Vector3_0_10_0;

Teleports block to coordinates X=0, Y=10 (up), Z=0

Or change only a specific axis (x, y or z):

Changing individual axes: transform_"Block"_position_y += 5; transform_"Block"_position_x = 20; transform_"Block"_position_z -= 3;

Raises block by 5 units, moves to 20 on X, pushes back 3 on Z

Supported axes: x, y, z

Working with vectors in math:

You can use mathematical expressions when creating vectors:

Examples with calculations: Vector3_10*2_5+5_1.5; transform_"Block"_position = Vector3_(player_target_activated_transform_position_x)_0_0;

Convert to String (_tostring)

To display coordinates, properties, or calculation results on a text panel, add the _tostring suffix at the end of the variable or property.

Display block position: text_"MySign" = "Block: " + transform_"Block"_position_tostring;
Display player health: text_"HealthBar" = "HP: " + player_target_activated_hp_tostring;

SetActive - Object Visibility Control

Controls whether objects are active in the game world. Inactive objects are not rendered, don't interact with physics, and don't execute scripts. This is useful for hiding/revealing objects, managing scene complexity, and creating dynamic game mechanics.

Syntax:

Parameter Description
a Object name in quotes, for example "Door" or "Light". Can be a variable (without quotes)
b true (object is active, visible and working) or false (object is inactive, hidden)

Common use cases:

Example 1: Disable door SetActive_"Door"_false; Log_"Door is hidden";
Example 2: Enable light SetActive_"Light"_true; transform_"Light"_position = Vector3_0_5_-10;
Example 3: Using variables local_doorName = "MainDoor"; local_isOpen = true; SetActive_local_doorName_!local_isOpen;
Example 4: Sequential management SetActive_"Door"_false; SetActive_"Light"_true; SetActive_"Trap"_false; text_"Status" = "Objects toggled";
Example 5: Cyclic visibility toggle Cycle_5 { SetActive_"Moving_Box"_true; Wait_1; SetActive_"Moving_Box"_false; Wait_1; }
Important: Inactive objects do not execute their scripts, so they cannot detect events like OnCollision until they are activated again.
Helpful tip: SetActive works on entire objects, not individual components. It completely disables/enables the entire object along with all its components and child objects.

ChangeSound - Audio Control

Allows you to manage speaker parameters in real time. Change music, volume, playback speed, working range and other properties of the audio source.

Syntax:

ChangeSound_"speaker"_"SoundCode"_volume_speed_radius_canPlayerToggle_playOnStart_visible_globalAudio

Parameters:

Parameter Type Description
a string Speaker object name
b string Music code (must be defined in map properties)
c float Music volume (0.0 - 1.0 and higher)
d float Playback speed (1.0 = normal)
e float Sound reach radius in game units
f bool Can player toggle speaker on/off (true/false)
g bool Play music when map loads (true/false)
h bool Show speaker 3D model in world (true/false)
k bool Audible everywhere on map, regardless of distance (true/false)

Usage examples:

Example 1: Set new music with parameters ChangeSound_"speaker"_"WpNight"_1_1_15_false_true_false_true;
Example 2: Change volume dynamically local_volume = 0.5; ChangeSound_"speaker"_"WpNight"_local_volume_1_15_true_true_true_false;
Example 3: Global background sound (audible everywhere) ChangeSound_"AmbienceLoop"_"Forest"_0.8_1_100_false_true_false_true;
Example 4: Local location-specific sound ChangeSound_"BellRing"_"BellSound"_0.7_1_20_false_true_true_false;
Example 5: Dynamic change based on listener if (contains_text_player_target_activated_name_"bot") { ChangeSound_"speaker"_"FastMusic"_1_1.5_20_false_true_false_false; } else { ChangeSound_"speaker"_"SlowMusic"_0.8_1_15_true_true_false_false; }
Good to know: If a parameter is set to an empty string (""), the speaker will stop. Global audio format (parameter k) ignores radius and plays sound everywhere on the map.
Important: Music codes must be pre-defined in the scene/map properties. Using incorrect music codes will result in no sound being played.

Log - Debug Output

Outputs debug messages to the developer console. Useful for tracking script execution, variable values, and diagnosing problems.

Syntax:

Log_"Message";

Message types:

Parameter Type Description
a string Message to output in quotes (supports string concatenation with +)
b string Log type (optional): "warning" (yellow) or "error" (red). Default is normal message (white)

Message types:

  • Normal: Log_"Message"; (white message)
  • Warning: Log_"Message"_"warning"; (yellow message)
  • Error: Log_"Message"_"error"; (red message)
Example 1: Simple message Log_"Hello World!";
Example 2: Error message Log_"Critical error!"_"error";
Example 3: Warning message Log_"Low HP value"_"warning";
Example 4: Logging variable values local_playerName = player_target_activated_name; local_score = 100; Log_"Player: " + local_playerName + ", Score: " + local_score;
Example 5: Tracking event execution Log_"Script started!"; SetActive_"Door"_true; Log_"Door opened"; Wait_2; Log_"Wait completed"_"warning";
Tip: Use Log for debugging script logic. Different message types help you quickly find critical errors and important events.
Console messages: Log messages are only visible in developer mode. In the finished project, they can be disabled for presentation to users.

Wait - Delay

Stops script execution for a specified number of seconds. Useful for creating pauses between events, synchronizing animations, or creating delays in game logic.

Syntax:

Wait_seconds;

Parameters:

Parameter Type Description
a float/int Time in seconds - supports decimal numbers (0.5, 1.25, etc.) and mathematical expressions

Features:

  • Time is specified in seconds
  • Decimal numbers are supported for delays less than 1 second
  • Mathematical expressions can be used
  • While waiting, the rest of the code does not execute
  • Variables can be used for time values
Example 1: Simple delay Log_"Starting"; Wait_2; Log_"2 seconds have passed";
Example 2: Partial seconds Wait_0.5; // Half a second Wait_0.1; // 0.1 seconds
Example 3: Mathematical expressions Wait_2+3; // Wait 5 seconds Wait_10/2; // Wait 5 seconds Wait_1*5; // Wait 5 seconds
Example 4: Using variables local_delayTime = 3; Log_"Waiting " + local_delayTime + " seconds"; Wait_local_delayTime; Log_"Waiting completed";
Example 5: Creating sequence of events SetActive_"Light1"_true; Wait_1; SetActive_"Light2"_true; Wait_1; SetActive_"Light3"_true; Wait_0.5; text_"Status" = "All lights on";
Example 6: Loop with delay Cycle_3 { Clone_"Box"; Wait_0.5; Log_"Clone created"; }
Important: Wait blocks execution of the rest of the script. If you need asynchronous delay, keep this in mind when designing your logic.
Tip: Use Wait to synchronize with animations, create pauses between actions, and establish rhythm in gameplay.

Cycle - Loops

Executes a block of code a certain number of times.

Parameter Description
a Number of repeats: integer (int) or inf (infinite)
Syntax: Cycle_5 { Log_"cycled"; }
Infinite loop: Cycle_inf { Log_"Infinite loop"; }

Transform - Object Transformation

Allows you to change object position, rotation, and scale.

Parameter Description
a Object name in quotes
b Property: position, localposition, rotation, localrotation, scale
c Axis (optional): x, y or z
d Value: number or Vector3_x_y_z
Examples: transform_"Block"_position_y += 5; transform_"Block"_scale = Vector3_2_2_2; transform_"Block"_rotation_z = 45;

Clone - Object Cloning

Creates exact copies of objects during script execution.

Method 1: Automatic name

Clone_"WoodCube";

Clone gets name: WoodCube_(1), WoodCube_(2) etc.

Method 2: Custom name

Clone_"WoodCube"_"MyNewCube";

Method 3: Save to variable

local_SpawnedCube = clone_"WoodCube"; transform_local_SpawnedCube_position_y += 10;

Clone yourself:

Clone_"self";

Destroy - Object Removal

Removes an object from the map during gameplay.

Remove an object: Destroy_"Door";
Remove yourself: Destroy_"self";
Note: Use "self" or "this" to remove the object on which the script is running.

Parent - Parenting

Connects objects in a hierarchy. Parented objects follow their parent's movement.

Parent block to another block:

transform_"Hat"_parent = transform_"HeadBlock";

Parent block to player:

transform_"Block"_parent = player_target_activated;

Unparent object:

transform_"Hat"_parent = "none";

Parent player to platform:

player_target_activated_parent = "Platform";

Text - Change Text

Changes text on text objects.

Parameters:

  • a - Text object name in quotes
  • b - Text in quotes (supports + concatenation)
Examples: text_"MySign" = "Hello!"; text_"MySign" += " How are you?"; textraw_"MySign" = "Just text";

Difference between text and textraw:

  • text - supports concatenation and variables
  • textraw - inserts text as-is, without processing

Player - Player Management

Powerful command for interacting with players, changing stats, and teleporting.

Search modes (mode):

  • target - search by target
  • nickname - search by nickname
  • saved - use saved player

Selectors for target:

  • all - all players
  • nearest - nearest player
  • farthest - farthest player
  • random - random player
  • activated - player who triggered the plate
  • local - local player

Usage examples:

player_target_activated_hp -= 10; player_target_nearest_jumpForce += 5; player_target_all_moveSpeed = 10;

Save a player:

player_save_"Winner"_target_activated; player_saved_"Winner"_hp = 100;

Player Stats

All available parameters for controlling player characteristics.

Basic stats:

Stat Description
hp Current player health
maxHp Maximum health
moveSpeed Running speed
jumpForce Jump height
respawnDuration Wait time before respawn

Stamina:

Stat Description
doesNotNeedStamina Disable fatigue (1=yes, 0=no)
maxStaminaValue Maximum stamina pool
staminaValue Current stamina
staminaRegen Stamina regeneration speed
staminaWaitTimeForRegen Delay before regeneration starts
Examples: player_target_activated_moveSpeed += 5; player_target_all_doesNotNeedStamina = 1; player_target_nearest_hp = player_target_nearest_maxHp;

Variables and Data Storage

Variables are virtual "boxes" for storing values. Creating and modifying variables requires no special commands.

Variable types by scope:

Type Scope Example
local_ Personal for player, all plates on map local_Coins = 10;
global_ Synced on server, visible to all global_Score = 100;
self_ Only this plate, for current player self_Count = 5;
globalself_ Only this plate, synced for all globalself_Health = 50;
plate_ Other plate's local variable plate_"Manager"_Value = 10;
globalplate_ Other plate's global variable globalplate_"Boss"_HP = 100;

Working with numbers and text:

local_Health = 100; local_Health -= 25; local_Health *= 2; global_Name = "Player1"; local_Message = "Hello, " + global_Name;
Note: Text must always be written in quotes!

Random - Random Numbers

The language has a built-in powerful random number generator that works like an "on-demand" variable. Instead of a variable name, you write the random command and the game automatically substitutes a random number! This lets you create diverse and unpredictable gameplay mechanics.

Basic syntax:

random_(Min)_(Max)

Random integer (int):

Generates an integer in the range, including boundaries:

Examples: local_Dice = random_1_6; local_Chance = random_0_100; self_AttackDamage = random_10_25;

Will generate numbers: 1 to 6, 0 to 100, 10 to 25 inclusive

Random float (with decimal):

Generates a number with a decimal part:

Examples: local_Chance = random_0_1_float; local_Speed = random_0.5_2.5_float;

Will generate numbers: 0.0 to 1.0 (e.g. 0.43), 0.5 to 2.5 (e.g. 1.73)

Random with step (rounding):

Generates a number that is a multiple of a specific step:

Examples: local_Angle = random_0_360_float_0.5; local_Price = random_100_1000_int_50;

Will generate numbers: 0 to 360 with 0.5 step (45.5, 120.0 etc), 100 to 1000 with 50 step

Practical usage examples:

Random positioning: transform_"Enemy"_position_x = random_-50_50_float; transform_"Enemy"_position_z = random_-50_50_float;
Random action selection: local_Action = random_1_3; if (local_Action == 1) { Log_"Selected option 1"; }

Conditions (If / Else If / Else)

Conditions allow you to execute different code depending on the situation.

Basic syntax:

if (condition) { // Code if true } else if (other_condition) { // Code if first is false but this is true } else { // Code in all other cases }

Comparison operators:

  • == - equal
  • != - not equal
  • > - greater than
  • < - less than
  • >= - greater than or equal
  • <= - less than or equal

Logical operators:

  • && - AND (both parts must be true)
  • || - OR (at least one part must be true)

Password check example:

if (local_Password == "1234") { SetActive_"Door"_false; Log_"Access granted!"; } else { Log_"Invalid password!"_"error"; }

Player health check:

if (player_target_activated_hp < 30) { player_target_activated_hp += 50; Log_"Player saved!"; } else if (player_target_activated_hp == player_target_activated_maxHp) { Log_"Health at maximum"; }

Complex check with AND/OR:

if (local_Coins >= 10 && local_HasKey == "true") { Log_"Chest opened!"; local_Coins -= 10; } else { text_"Info" = "Need 10 coins and key!"; }

Contains - Text Search

Operator contains checks if one text is inside another. Case-insensitive.

Syntax:

if (text1 contains text2) { ... }

Check object name:

if (transform_"SecretDoor"_name contains "Door") { Log_"Name contains Door!"; }

Password check:

if (local_EnteredPassword contains "admin") { Log_"Found word admin"_"warning"; }

Foreach - List Iteration

Foreach is a loop that iterates through each element in a list (array) and stores the current element's name in a variable at each step. Inside the curly braces you write code that executes for EACH list element in sequence.

Syntax:

foreach (variable in list) { // Code executes once for each element // "variable" will contain the current element's name }

You can use any variable type (local_, global_, self_ etc) as the variable. At each step it will record the name (name) of the current object or player from the list.

Available lists (arrays):

  • GetAllObjects - list of all objects present on the map
  • GetAllPlayers - list of all players currently in the game
  • transform_(a)_childs - list of child objects "attached" to object (a)
  • player_(mode)_(selector)_childs - list of child objects "attached" to a player
Important: These lists cannot be recorded directly into a variable, they can only be iterated through with foreach.

Usage examples:

Print names of all objects on the map: foreach (local_Item in GetAllObjects) { Log_"Found object: " + local_Item; }
Heal all players on the map: foreach (local_P in GetAllPlayers) { player_nickname_local_P_hp = player_nickname_local_P_maxHp; }
Iterate all child objects and disable them: foreach (local_Child in transform_"Container"_childs) { SetActive_local_Child_false; }
Note: To further work with a player or object whose name you got in the loop, use player_nickname_VariableName_... or transform_VariableName_...

Name - Object and Player Names

Each object in the world and each player has a name property that uniquely identifies them. Object names can be read and modified at any time, while player names are read-only for security reasons.

Object Names:

Every object has a unique name that persists if you save the map or clone the object.

Getting an object name:

transform_"Block"_name

Player Names (Name vs Nickname):

Players have two name properties:

Property Description
name Internal player identifier (assigned by system, read-only)
nickname Player's display name (set if player connected to server, shorter and user-friendly)

Syntax for reading player names:

Syntax Returns
player_target_activated_name Internal name of activated player
player_target_activated_nickname Real nickname (if player is connected)
player_[selector]_[filter]_name Internal name with selector and filter
player_[selector]_[filter]_nickname Nickname with selector and filter

Modifying object names:

Object names can be changed during script execution. This is useful for tracking objects or simplifying references later.

transform_"Block"_name = "NewName"; transform_"Block"_name += "_2"; text_"Output" = transform_"NewName_2"_name;

Real-world usage examples:

Example 1: Player greeting text_"Welcome" = "Hello, " + player_target_activated_nickname + "!";
Example 2: Tracking created objects clone_"Projectile"_transform_"Bullet1" = new_transform; transform_"Bullet1"_name = "fired_projectile_" + timer_; log_(transform_"fired_projectile_" + timer__name);
Example 3: Player identification if (player_target_activated_nickname != "") { text_"Info" = "Server player: " + player_target_activated_nickname; } else { text_"Info" = "Offline player: " + player_target_activated_name; }
Important: Player names and nicknames cannot be changed! This is a security restriction to prevent player impersonation and maintain server integrity. Only object names can be modified.
Note: Nicknames only have values if the player is connected to the server. Offline players will have an empty nickname, in which case you can use the internal name for identification.