Magic Crystal Crafting: Make Your Own Power-Ups!
verse-library
@editable
my_spawner: item_spawner_device = item_spawner_device{}
# This runs when the game starts
OnBegin<override>()<suspends>:void=
# Subscribe to the button's activation event.
# ActivatedEvent fires with the agent (player) who pressed it.
my_button.InteractedWithEvent.Subscribe(OnActivated)
# This function runs when the button is pressed
# agent is the player who clicked the button
OnActivated(Agent : agent) : void =
# Try to get the fort_character from the agent so we can check inventory