Here is a step-by-step tutorial to make multiple spawnpoints in your game
Let’s dive into how you can set up multiple spawn points in your game:
First Step
The basics for all behaviors
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.
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
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
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)
Fifth Step
Exit the Behavior Editor, playtest and ensure it works as expected!
Here is a step-by-step tutorial to make multiple spawnpoints in your game
Let’s dive into how you can set up multiple spawn points in your game:
First Step
The basics for all behaviors
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.
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
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
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)
Fifth Step
Exit the Behavior Editor, playtest and ensure it works as expected!