LogicUsing Conditions
Build Mode Condition
Check if the map is currently in Build Mode.
The Build Mode Condition checks whether the map is currently in Build Mode. This is a simple but essential condition for creating tools and shortcuts that should only work for map creators, not for regular players.
Configuration
This condition has no configuration options. It simply returns true if the map is in Build Mode, and false if it's in Play Mode.
Use Cases
- Creating an admin tool (e.g., a custom item that teleports you) that only works while you are building.
- Preventing certain game logic (like a round timer) from running while you are editing the map.
- Displaying different information on a scoreboard for builders versus players.
Example: An Admin Teleport Tool
- Create a Custom Item: Make a custom item called "Admin Compass".
- Create a Function: Make a function called
TeleportToSpawn. Add aTeleportaction that teleports the player to the map's spawn. - Add Logic to the Item:
- Edit the "Admin Compass" item.
- Set its Right Click Function to a new function, let's call it
AdminToolCheck.
- Configure the
AdminToolCheckFunction:- Add a
Conditionalaction. - Condition:
Build Mode Condition. - If Actions: Add a
Call Functionaction that calls yourTeleportToSpawnfunction.
- Add a
Now, when anyone right-clicks the Admin Compass, it will only teleport them if the map is currently in Build Mode. Players in Play Mode can click it, but nothing will happen.