I am trying to make an array of triggers (12) correspond to a teleporter(12)…
I might be really far off. I am very new to verse.
so I get this error:
This function parameter expects a value of type agent, but this argument is an incompatible value of type ?agent.(3509)
Agent:?agent
FULL CODE:
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
A Verse-authored creative device that can be placed in a level
game_manager := class(creative_device):
@editable var CE_TELEPORTERS : []teleporter_device = array{}
@editable var CR_TRIGGER : []trigger_device = array{}
# Runs when the device is started in a running game
OnBegin<override>()<suspends>:void=
block:
# Function to initialize triggers and setup event subscription
InitializeTriggers() : void =
for (Trigger : CR_TRIGGER):
Trigger.TriggeredEvent.Subscribe(TeleportToCE)
TeleportToCE(Agent:?agent) : void =
for (teleporter : CE_TELEPORTERS):
teleporter.Teleport(Agent)