Hey!
I’m facing an issue where a binding in a verse device keeps resetting itself, every time I restart the editor it ends up erasing the array and leaving it blank. I haven’t been able to figure out the cause or how to fix it. I’d really appreciate any help!
Below is the full code from the verse device:
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
ring_index := class<concrete>():
@editable RingEventManager : ring_event_manager = ring_event_manager{}
@editable var Listed : logic = true
CheckListing():void=
if(Listed = true):
LoadEvent()
else:
Print("...error: Ring currently unlisted")
LoadEvent():void=
RingEventManager.LoadRing()
UnloadEvent():void=
RingEventManager.UnloadRing()
SendBackToLobby(Agent:?agent):void=
RingEventManager.BackToLobby(Agent)
game_manager := class(creative_device):
@editable var LoadRingIDX : int = 0
@editable LoadRing : trigger_device = trigger_device{}
@editable UnloadRing : trigger_device = trigger_device{}
@editable Ring_Index : []ring_index = array{}
@editable Lobby_Player_Spawners : []teleporter_device = array{}
OnBegin<override>()<suspends>:void=
LoadRing.TriggeredEvent.Subscribe(LoadRingIDXEvent)
UnloadRing.TriggeredEvent.Subscribe(UnloadRingIDXEvent)
LoadRingIDXEvent(Agent:?agent):void=
if(Trigger := Ring_Index[LoadRingIDX]):
Print("Attempting load...")
Trigger.CheckListing()
for(Trigger:Lobby_Player_Spawners):
Trigger.Disable()
UnloadRingIDXEvent(Agent:?agent):void=
if(Trigger := Ring_Index[LoadRingIDX]):
Print("Attempting unload...")
Trigger.UnloadEvent()
for(Trigger:Lobby_Player_Spawners):
Trigger.Enable()
Print("Global Lobby_Player_Spawners Enabled")
if(Trigger := Ring_Index[LoadRingIDX]):
Print("Attempting to return to lobby...")
Trigger.SendBackToLobby(Agent)