Commands
You can create your own commands.

Every command has its formula!
You create formulas by your self. Commands can be of any complexity and structure!

How to create command
For example we want to create command that will spawn balls in our scene.
It contains 2 parts: sentence "Spawn_balls" + Integer "count"
Spawn_balls [int: count]
1. Create CmdFormula
CmdFormula
Create CmdFormula
field in your script.

Select SpaceType: Space
or Underline _
➕ You can add new part (or remove e excess part) and customize it. We need 2 parts.
Select PartType
for each part and our formula should look like this:

2. Create a method that will be called when executing the command
CmdInputResult contains user's input string already separated in parts and parsed to necessary types! So to get balls count you just need to get value from Part that contains balls count value:
3. Register your command
You need to register your command in Console
✅ All done!


Last updated