# © Spark Universe, 2023
# authors: destruc7i0n
# description: "allocate" a new location for the tutorial, run as player
# called by: 

tag @s add in_tutorial
gamemode a @s

# teleport the player to the tutorial instance location
execute at @e[tag=tutorial_main] run tp @s ~ ~1 ~

scoreboard players operation .alloc_id player_id = @s player_id
execute as @e[tag=tutorial_main] at @s run function spark/tutorial/instance/create
scoreboard players reset .alloc_id player_id
