using { /Fortnite.com/Devices } using { /Verse.org/Simulation } # This is our "Summoner" script. # It listens for a player to enter the zone. summoner_device := class(creative_device) { # This is our "Reference" to the Creature Placer. # Think of this as writing down the Creature Placer's phone number. # We will drag the Creature Placer device into this slot in the editor. @editable CreatureToSpawn: creature_placer_device = creature_placer_device{} # This is the main function that runs when the device starts. # It waits for a player to enter the trigger volume, then spawns the creature. OnBegin(): void = { # Wait for the event to happen. # This pauses the code until a player steps in the zone. # (In a real project you would hook up a trigger_volume_device here.) # Now that a player is here, let's spawn the monster! # We call the Spawn() function on our CreatureToSpawn reference. # This is like picking up the phone and dialing the number. CreatureToSpawn.Spawn() # Optional: Log a message to the console to prove it worked. Print("Monster Spawned! Run!") } }