# SkyGateLogic.verse
# This script connects a Trigger to a Biplane Spawner.
use EngineLibs.Core
use DevicesLib.Trigger
use DevicesLib.BiplaneSpawner
# This is our main "Actor" (the thing that runs the logic)
# Think of an Actor as a specific device or object that has a job.
actor SkyGateLogic:
# These are "Properties" - the devices this script controls.
# We tell Verse which devices to watch by name.
trigger_device: TriggerDevice = Self.GetParent().FindDevice<TriggerDevice>("SkyGateTrigger")
biplane_spawner: BiplaneSpawnerDevice = Self.GetParent().FindDevice<BiplaneSpawnerDevice>("BiplaneSpawn")
# This is a "Function" (a set of instructions).
# We call this function when the trigger is hit.
on_trigger_hit():
# 1. Spawn the Biplane
# The "Spawn" function creates the vehicle at the spawner's location.
biplane_spawner.Spawn()
# 2. Optional: Tell the player something happened
# We can use a HUD Message device if we had one linked,
# but for now, let's just spawn the plane.
print("Biplane spawned! Fly safe!")
Verse Library
verse
01 Fragment
Spawns a biplane vehicle when a player interacts with or triggers a designated zone.
verse-library/using-biplane-spawner-devices-in-fortnite-creative/01-fragment.verse