📖 Wall Plast Documentation

Complete guide to the game scripting language

Language Syntax

The scripting language features a direct, easy-to-learn structure. First comes the command name (case-insensitive), followed by parameters separated by underscores _.

Basic command syntax: Log_"Hello world!"

Where "Log" is the command, and "Hello world!" is the parameter.

Primary Syntax Rules:

  • Commands are case-insensitive (Log, log, and LOG execute identically).
  • Parameters must be separated using a single underscore character _.
  • Text parameters are enclosed in quotation marks "" to facilitate internal script processing.
  • Separate distinct commands using a semicolon ; for consecutive execution.
Executing commands consecutively: SetActive_"Block"_false; Log_"block hidden";

This executes SetActive first, then outputs "block hidden" to the log immediately.

Mathematical Operations

The engine supports math calculations dynamically within scripts. Supported operations: + (addition), - (subtraction), * (multiplication), and / (division).

Math examples: Wait_2+2; transform_"Block"_position_y = 10 * 5; player_target_activated_moveSpeed *= 2;

The script delays by 4 seconds, teleports the block to Y coordinates of 50, and doubles the player's run speed.

Assignment Operators:

Use assignment operators to alter values of variables, spatial offsets, and textual strings:

  • = - Overwrites with the exact specified value.
  • += - Increases the current value.
  • -= - Decreases the current value.
  • *= - Multiplies the current value.
  • /= - Divides the current value.

String Concatenation:

You can dynamically join text strings and numerical values using the + sign:

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

Plate Events

Scripts are bound to designated structural events belonging to active game plates. Understanding the precise timing and execution behaviors of plate events is essential to crafting robust mechanics.

Event Trigger Condition & Behavior
Start Fires once when the map test begins. If you revert to build mode and restart the test, it triggers again. Perfect for initial variable state declarations.
Update Loops continuously every single frame while the map is active. Highly suited for spatial updates or periodic condition tracking.
OnPress Fires exactly ONCE the moment a player steps onto the plate, depressing it. When OnPress triggers, any currently running OnRelease or WhileNotPressed loops on the plate are immediately aborted to prevent logical conflict.
WhilePressed Executes in a continuous, fast loop for as long as one or more players remain standing on the depressed plate. Runs immediately after OnPress.
OnRelease Fires exactly ONCE when the plate returns upward to its unpressed state as the last player steps off. Instantly terminates any active OnPress or WhilePressed scripts.
WhileNotPressed Runs repeatedly in a loop for as long as no players are standing on the plate. Runs right after OnRelease terminates.
Developer Tip: Entering build mode strictly aborts all running loops and triggers instantly, preserving absolute editing safety.

Logical Event Flowchart:

Start ➜ Update (repeats every frame) ↓ Player steps on ➜ OnPress (1 time) ➜ WhilePressed (repeats) ↓ Player steps off ➜ OnRelease (1 time) ➜ WhileNotPressed (repeats)

Coordinates and Vectors (Vector3)

3D assets utilize vectors denoted by the Vector3_X_Y_Z structure, representing spatial positions, rotation parameters, and bounding scales. X controls horizontal left/right axis, Y controls vertical up/down elevation, and Z defines depth axis.

Generating a vector: Vector3_10_5_1.5

Generates a 3D coordinate where X=10, Y=5, and Z=1.5.

Applying spatial modifications:

You may override the complete coordinate properties of a target object in one call:

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

Teleports the object to coordinate position (0, 10, 0).

Or shift single dimensional parameters (x, y, or z):

Modifying independent dimensions: transform_"Block"_position_y += 5; transform_"Block"_position_x = 20; transform_"Block"_position_z -= 3;

Evaluating mathematical operations within vectors:

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

Convert to String (_tostring)

Convert numerical coordinates, properties, or variables to strings to display them on message signs or textual canvas items using the _tostring suffix.

Exposing position coordinates: text_"MySign" = "Block location: " + transform_"Block"_position_tostring;
Exposing player state values: text_"HealthBar" = "Your Health: " + player_target_activated_hp_tostring;

Reading World Properties as Variables

In addition to relying on user-defined storage variables, you can read properties from players or objects on the map directly inside mathematical operations or string concatenations!

Read Height of a Block: local_BlockHeight = transform_"MyBlock"_position_y;
Calculate Health Deficit: local_HpDifference = player_target_activated_maxHp - player_target_activated_hp;
Relative Spatial Binding: transform_"Block1"_position_y = transform_"Block2"_position_y + 10;

Binds Block 1's elevation to constantly remain exactly 10 units above Block 2.

SetActive - Object Visibility Control

Controls visibility and interactivity of items. Inactive objects are completely hidden, perform no physics calculations, do not collide, and ignore execution calls.

Syntax: SetActive_(a)_(b)

Parameter Type Function
a string Name of targeted item (in quotation marks, e.g. "Door").
b bool Set to true to make the item active, or false to hide/deactivate.
Typical applications: SetActive_"Door"_false; SetActive_"LaserGrid"_true;

ChangeSound - Audio Control

Modifies target music players and speaker states in real-time. This command controls play status, volume parameters, reach limits, and general UI model properties.

Syntax:

ChangeSound_"speaker"_"WpNight"_1_1_15_false_true_false_true

Required Parameters:

Parameter Type Description
astringName of target speaker asset.
bstringMusic tracking key.
cfloatSound volume level (standard: 0.0 to 1.0).
dfloatPlayback speed modifier (standard: 1.0).
efloatPhysical reach boundary radius in world distance units.
fboolIndicates whether players can toggle sound using interaction UI (true/false).
gboolPlay immediately on map load/test startup (true/false).
hboolRender the speaker model in 3D scene (true/false).
kboolConfigure audio globally so it is heard everywhere on the map (true/false).
Tip: If the music code parameter (b) is passed as an empty string "", the targeted speaker will stop playing.

Log - Debug Output

Outputs textual strings or variable logs onto the developer debug console screen.

Syntax: Log_(a)_(b)

  • a - Text parameter containing debug details (supports string concatenation).
  • b - Optional categorizer: use "warning" (highlights in yellow) or "error" (highlights in red).
Logging syntax examples: Log_"Initialization started..."; Log_"Low energy levels detected!"_"warning"; Log_"Failed connection attempt!"_"error";

Wait - Execution Delay

Halts script progress for the specified amount of seconds. Fractional float notations are fully supported.

Wait command expressions: Wait_2; Wait_0.25; Wait_1.5 + 2.5;

Cycle - Loops

Repeats execution of the enclosed code block. Loop iteration parameters accept either integer quantities or the inf key to create a persistent loop.

Standard loop declaration: Cycle_5 { Log_"Looping text message"; Wait_1; }
Infinite loop declaration: Cycle_inf { transform_"Piston"_position_y += 1; Wait_0.1; }

Transform - Spatial Modification

Controls position offsets, angle parameters, and bounds of targeted world items.

Syntax: transform_(a)_(b)_(c) = (d)

  • a - Name of targeted item (e.g. "Platform").
  • b - Selected property: position, localposition, rotation, localrotation, or scale.
  • c - Selected axis dimension (optional): x, y, or z.
  • d - Numerical value or Vector3 statement.
Transform applications: transform_"Platform"_position_y += 3; transform_"Block"_scale = Vector3_2_2_2;

Clone - Object Cloning

Creates duplicates of objects during active gameplay. Duplicates inherit all original properties, scripting layers, and assets.

Creating a clone with automated naming:

Clone_"BrickBox";

Duplicates BrickBox, auto-generating incremented tags: BrickBox_(1), BrickBox_(2), etc.

Creating a clone with a specific name:

Clone_"BrickBox"_"BoxCopy";

Cloning self:

Clone_"self";

Recording cloned references directly into variables:

local_MyZombie = clone_"ZombieBoss"; transform_local_MyZombie_position_y += 10;

Destroy - Object Removal

Removes targeted objects from the game map dynamically during runtime.

Syntax examples: Destroy_"OldObstacle"; Destroy_"self"; // Removes the active script plate

Parent - Hierarchy Binding

Creates parent-child relationships between physical objects or players, making child objects follow the coordinates, scaling changes, and rotation offsets of their parent assets.

Attaching a block to another block: transform_"Cap"_parent = transform_"HeadObject";
Attaching a block to the active player: transform_"Flag"_parent = player_target_activated;
Detaching a block: transform_"Cap"_parent = "none";
Binding player coordinates to physical platforms (e.g., elevators): player_target_activated_parent = "ElevatorPlatform";

Text - Text Modifications

Modifies text displayed on world canvas items.

  • text - Processes mathematical statements, operations, and variables inside the string.
  • textraw - Displays the assigned characters exactly as written without translating scripting variables.
Display formatting examples: text_"SignBoard" = "Welcome back!"; text_"SignBoard" += " Level: " + local_Level; textraw_"StaticSign" = "Direct translation of local_Var";

Player - Player Management

A set of properties to control player positions, stats, and states during runtime.

Query Modes (mode):

  • target - Scans based on targeting conditions.
  • nickname - targets using exact player nickname.
  • saved - Reference to a saved player reference.

Filters under targeting:

  • all - Targets every single active player.
  • nearest - targets the closest player to the plate.
  • farthest - targets the furthest player from the plate.
  • random - targets a random active player.
  • activated - targets the player who triggered the plate event.
  • local - targets the client player.

Reference Syntax: player_(mode)_(selector)_(stat)

Player manipulation syntax: player_target_activated_hp -= 20; player_target_nearest_jumpForce = 15;

Saving references:

You can record player references into temporary script files to target them persistently regardless of physical proximity changes:

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

Player Stats Reference

You can dynamically read or write health, physical, speed, and recovery properties on players. Modify the targeting stat key with any of the following variables:

General Metrics:

Stat Key Description & Limits
hpCurrent player health. Will eliminate player if reduced to 0.
maxHpHealth pool maximum boundary.
moveSpeedThe player's run speed.
jumpForceThe physical upward force applied when leaping.
respawnDurationThe length of delay in seconds before a player respawns.

Stamina Properties:

Stat Key Description & Limits
doesNotNeedStaminaSet to 1 to allow infinite sprint without fatigue. Set to 0 to enable normal stamina drain.
maxStaminaValueMaximum capacity of player's stamina reserve.
staminaValueCurrent real-time stamina level.
staminaRegenRecovery rate of stamina points per second.
staminaWaitTimeForRegenDelay in seconds after sprinting stops before stamina begins to regenerate.
Stats manipulation syntax: player_target_activated_moveSpeed += 3; player_target_all_doesNotNeedStamina = 1;

Camera Settings

Manipulate camera perspectives, zoom thresholds, and field-of-view limits for players. These settings use the standard player query syntax: player_(mode)_(selector)_(stat).

Camera Stat Key Behavior & Values
cameraMode Sets camera perspective. 0 = First-Person View (FPV), 1 = Third-Person View (TPV).
CanChangeView Determines if the player can toggle between FPV and TPV via hotkeys. 1 = Allowed, 0 = Locked.
fov Global Field of View. Higher numbers widen the player's viewing range.
1fov Field of View applied specifically in First-Person Mode.
3fov Field of View applied specifically in Third-Person Mode.
minZoomMultiplier The closest camera boundary in TPV. 0.4 means the player can zoom in up to 40% of standard distance.
maxZoomMultiplier The furthest camera boundary in TPV. 3.0 allows zooming out up to 300% of standard distance.
Camera modification examples: player_target_activated_cameraMode = 0; // Force FPV player_target_all_CanChangeView = 0; // Lock perspective switching player_target_activated_minZoomMultiplier = 1; player_target_activated_maxZoomMultiplier = 1; // Locks the zoom level completely

Variables and Data Storage

Variables serve as storage containers for numbers or string text. You do not need to pre-declare variables; simply assign a value to instantiate them.

Variable Types & Execution Scope:

Prefix Tag Storage Scope Code Example
local_ Specific to the individual player, but shared across all script plates on the map. local_Coins += 1;
global_ Synced over the server session and visible to all active users. global_RedTeamScore += 10;
self_ / localself_ Stored privately within the executing script plate, unique to each client player. self_ClicksCount += 1;
globalself_ Stored inside the executing plate, but values are synced for all active players on the server. globalself_BossHp -= 5;
plate_ / localplate_ Accesses a local_ variable stored inside an external target plate. plate_"MainManager"_Status = "Active";
globalplate_ Accesses a global_ variable stored inside an external target plate. globalplate_"BossPlate"_Health = 100;
Modifying numeric and string storage: local_MaxHealth = 100; local_MaxHealth -= 25; global_CurrentLeader = "Player1"; local_Notification = "Active Leader: " + global_CurrentLeader;

Random - Random Numbers

Use the integrated random number generator to create unpredictability and dynamic mechanics. It evaluates directly on execution.

Basic Syntax: random_(Min)_(Max)

Random Integer Selection:

local_DiceOutcome = random_1_6; // Returns an integer from 1 to 6 inclusive local_RewardCoins = random_10_100;

Random Float Selection (Decimals):

local_NormalizedValue = random_0_1_float; // Returns floats such as 0.35 or 0.89 local_RandomVelocity = random_0.5_2.5_float;

Random Step Increments (Rounding):

local_AngleRotation = random_0_360_float_0.5; // Stepped increments of 0.5 (e.g., 90.5) local_MerchantCost = random_100_1000_int_50; // Stepped increments of 50 (e.g., 350)

Conditions (If / Else If / Else)

Conditions route execution flows based on dynamic variables, player stats, or spatial properties.

Comparison Operators:

  • == (equality check), != (inequality check)
  • > (greater than), < (less than)
  • >= (greater than or equal), <= (less than or equal)

Logical Joining:

  • && (Logical AND - true only if both statements evaluate to true).
  • || (Logical OR - true if at least one statement evaluates to true).
Condition logic layout: if (local_EnteredPassword == "secret123") { SetActive_"SecretDoor"_false; Log_"Vault access authorized!"; } else { Log_"Access Denied!"_"error"; }
Complex verification loops: if (local_Coins >= 10 && local_HasKey == "true") { Log_"Opened the ancient chest!"; local_Coins -= 10; SetActive_"AncientChest"_false; } else { text_"DisplayScreen" = "Requires 10 coins and a Key!"; }

Contains - Text Filtering

Checks if a substring exists within a targeted block of text. The search is case-insensitive.

Syntax: if (textString contains subString) { ... }

Valid contains checks: if (transform_"SecretDoor"_name contains "Door") { Log_"Sub-string 'Door' matched in asset name!"; }

Custom Arrays and Their Creation

Arrays allow storing multiple values in a single variable. In Wall Plast, custom arrays are created through string variables where values are separated by commas ,. Individual elements can be accessed by their index (position) using square brackets [index].

Important: Index numbering starts at 0. The first element has index [0], the second — [1], the third — [2], and so on.

Creating an Array

Simply assign a string with comma-separated elements to a variable:

Creation example: local_Inventory = "sword,shield,potion";

Creates a 3-element array: sword (index 0), shield (index 1), potion (index 2).

Reading an Element by Index

Use square brackets with the element number:

Read examples: text_"Display" = local_Inventory[0]; // Shows "sword" text_"Display" = local_Inventory[1]; // Shows "shield" local_Selected = local_Inventory[2]; // Saves "potion" to variable

Modifying an Element by Index

You can replace any array element by specifying its index:

Replacement examples: local_Inventory[1] = "bow"; // Array becomes: "sword,bow,potion" local_Inventory[0] = "axe"; // Array becomes: "axe,bow,potion"
Appending a new element: local_Inventory += ",helmet"; // Array becomes: "axe,bow,potion,helmet"

Counting Array Elements (_count)

Get the number of elements in an array using the _count suffix:

_count example: local_Total = local_Inventory_count; // Returns 3 text_"Info" = "Inventory has " + local_Inventory_count + " items";

Using Arrays in Conditions

You can compare array elements or check their count:

Condition examples: if (local_Inventory[0] == "sword") { Log_"You have a sword!"; } if (local_Inventory_count >= 3) { Log_"Inventory is almost full!"; }

Iterating an Array with foreach

You can loop through all array elements using the array name as a collection:

Iteration example: foreach (local_Item in local_Inventory) { Log_"Item: " + local_Item; }

Logs: "Item: sword", "Item: bow", "Item: potion".

Indexing Built-in Lists

Square brackets work not only with custom arrays, but also with built-in lists:

Indexing examples: local_FirstPlayer = GetAllPlayers[0]; // First player in the game local_ThirdObject = GetAllObjects[2]; // Third object on the map local_FirstChild = transform_"MyBlock"_childs[0]; // First child object local_PlatePlayer = plate_"self"_standingplayers[0]; // First player standing on the plate
Arrays from other plates: plate_"Manager"_Inventory[0] // First element of an array from plate "Manager" globalplate_"Data"_Items[2] // Third element of an array from global plate data

Foreach - List Iteration

Iterates through a list of objects or players, executing the enclosed code block for each element. The variable specified in the loop captures the name of the current item on each iteration.

Syntax: foreach (temp_variable in active_list) { ... }

Available Core Arrays:

  • GetAllObjects - Fetches every physical object currently spawned on the map.
  • GetAllPlayers - Fetches all players currently logged in the game session.
  • transform_"ObjectName"_childs - List of direct children bound to "ObjectName".
  • player_target_activated_childs - List of direct children bound to the active player.
Cycle through objects and log their names: foreach (local_Item in GetAllObjects) { Log_"Asset tracked: " + local_Item; }
Apply health restore to all players: foreach (local_P in GetAllPlayers) { player_nickname_local_P_hp = player_nickname_local_P_maxHp; }
Syntax Warning: To manipulate dynamic properties on items captured via loops, use their variable key with nickname target syntax, e.g. player_nickname_local_P_hp = 100;.

Counting Players on Plate (standingplayers)

Each plate tracks all players currently standing on its surface. This array is named standingplayers, and can be queried from the active plate or any external plate by its name.

Querying player quantities:

  • plate_"self"_standingplayers_count - Number of players on this plate.
  • plate_"OtherPlate"_standingplayers_count - Number of players on the plate named "OtherPlate".
Exposing plate count: text_"Counter" = "Players on plate: " + plate_"self"_standingplayers_count;
Group threshold conditions: if (plate_"self"_standingplayers_count >= 2) { Log_"Plate activation limit satisfied!"; }

Iterating through players standing on a plate:

foreach (local_P in plate_"self"_standingplayers) { player_nickname_local_P_hp = 100; // Instantly heals every standing player }

Arrays: Counting Elements (_count) and Nested Lists

Append the _count suffix to any array statement to get its total item quantity immediately without running manual iteration loops.

Counting Arrays:

Count Syntax Statement Description
GetAllPlayers_countTotal players in session.
GetAllObjects_countTotal objects currently active on the map.
transform_"Block"_childs_countNumber of direct child elements linked to "Block".
player_target_activated_childs_countNumber of direct child elements linked to player.
Safety verification example: if (GetAllPlayers_count > 0) { Log_"There are active players online!"; }

Deep Child Hierarchy Searches (_true)

Standard child requests like transform_"Block"_childs only return immediate descendants. Append the _true suffix to recursively fetch all descendants (children, grandchildren, great-grandchildren, etc.).

  • transform_"Block"_childs_true - List of all descendants at any nesting level.
  • transform_"Block"_childs_true_count - Total count of direct and nested descendants.
Calculating total nested items: local_TotalDescendants = transform_"Container"_childs_true_count;

Name - Object and Player Names

Each object and player has a name property. Object names can be read and modified dynamically, while player names are read-only for security reasons.

Object Names:

Read the name of an object using transform_"Block"_name:

text_"MySign" = "Object Name: " + transform_"Block"_name;

Player Names (Name vs Nickname):

Property Description
name Internal player identifier assigned by the system (read-only).
nickname Player's display name when connected to server. Offline players fallback to name.
Greeting players: text_"Welcome" = "Hello, " + player_target_activated_nickname + "!";

Modifying object names during execution:

transform_"Block"_name = "NewName"; transform_"Block"_name += "_2";
Security Limit: Player names cannot be overwritten by scripts. Statements like player_target_activated_name = "Player"; will raise debug exceptions.

Fog - Scene Fog Control

Control the scene's fog (Unity's RenderSettings) directly from a plate script - toggle it on\off, change its color, distance and density.

Command Description
Fog_enabled = (a); Turns fog on or off. a - true OR false.
Fog_color = (a); Sets the whole fog color at once. a - Color_r_g_b OR Color_r_g_b_a (alpha is optional, defaults to 1).
Fog_color_r = (a);
Fog_color_g = (a);
Fog_color_b = (a);
Fog_color_a = (a);
Changes a single fog color channel. Supports +=, -=, *=, /=.
Fog_mode = (a); Fog mode. a - a number (0 Linear, 1 Exponential, 2 Exponential Squared) OR text ("linear", "exponential", "exponentialSquared").
Fog_startDistance = (a); The distance where fog starts (Linear mode). Supports +=, -=, *=, /=.
Fog_endDistance = (a); The distance at which fog becomes fully opaque (Linear mode). Supports +=, -=, *=, /=.
Fog_density = (a); Fog density (Exponential modes). Supports +=, -=, *=, /=.
Fog control examples: Fog_enabled = true; Fog_color = Color_.25_.25_.25; Fog_color_r = .5; Fog_mode = "linear"; Fog_startDistance = 10; Fog_endDistance = 50; Fog_density += .01;

Reading fog parameters (for example, inside if conditions): the same parameters are available in lowercase with the fog_ prefix (without the Fog word used in assignment commands):

Read Token Description
fog_enabledReturns true (1) if fog is enabled, otherwise false (0).
fog_modeReturns the current fog mode as a number (0, 1 or 2). Always numeric, even if it was set using text.
fog_startdistance, fog_enddistance, fog_densityCurrent values of the corresponding parameters.
fog_color_r, fog_color_g, fog_color_b, fog_color_aCurrent values of the fog color channels.
Note: fog_mode always reads back as a number - comparing it to text (fog_mode == "linear") is not supported, use numbers instead (fog_mode == 0).
Reading fog state: if (fog_enabled == true) { Log_"Fog is currently enabled"; }

Fog_syncForAllClients - Syncing Fog Between Players

The map always has a single service object holding the game settings, which has a flag that syncs the scene fog between every player on the server. When enabled, the host's fog parameters are automatically applied to all players. This flag can be controlled directly from a plate script.

Usage: Fog_syncForAllClients = true; // Enables fog synchronization for all players Fog_syncForAllClients = false; // Disables it - fog stays local to each client again
Host Only: Only the host (whoever has State Authority over the settings object) can change this parameter. If a regular client attempts it, the command does not execute and the debug menu shows: "The current player is not the host; do not use local scripts to guarantee a change to this parameter." This check is skipped while in map Build Mode, so the command can be freely tested alone.

The current state of the flag can also be read inside a condition:

if (fog_syncforallclients == true) { Log_"Fog sync is active"; }

Boolean Values (true / false)

Besides the numbers 1 and 0, conditions and math expressions now also accept the words true and false - they are automatically treated as 1 and 0 respectively. Letter case doesn't matter (TRUE, False, true all behave identically).

Usage example: if (fog_enabled == true) { Log_"Fog is on!"; } else { Log_"Fog is off!"; }