1
First Step
The basics for all behaviors
The basics for all behaviors
- Tap on the object to which you want to add a behavior
- With the object selected, tap on the “Details” button to the left of your screen.
- In the Details panel, tap “Add Behavior”.
2
Second Step
Decide what will trigger the behavior. This could be an action like a collision, an interaction, or the game starting. Select a “Trigger” box and drag it into the editor.
3
Third Step
Navigate to the “Game Actions” section and select the “Set player position” block. Tap on the Player “Graph” button and set the player being affected by the trigger.
Behavior Image
Behavior Image
4
Fourth Step
For the different spawn points, you’ll need to build custom logic. Tap on the position number and select “Add Custom Graphs”:
1. Start by creating an Object list variable
1. Start by creating an Object list variable
2. Tap on the variable and select multiple object positions you want to transform as your potential spawn points
2. Tap on the variable and select multiple object positions you want to transform as your potential spawn points
3. Connect your [nodes](https://wiki.soba.xyz/behavior-editor/general/nodes-list) so that when the object list is shuffled, a position is picked, converted into coordinates, and then used as the final teleport destination (as illustrated below)
3. Connect your [nodes](https://wiki.soba.xyz/behavior-editor/general/nodes-list) so that when the object list is shuffled, a position is picked, converted into coordinates, and then used as the final teleport destination (as illustrated below)
5
Fifth Step
Exit the Behavior Editor, playtest and ensure it works as expected!