I have a question regarding triggers and class selectors. I am using the custom rng device code from the repository. Sometimes trigger for team x will show the hud message device of team y (it normally only has activate on trigger x). The triggers in my world activate a lot of stuff. At the least each a hud device and a class selector device to change the team. Why does this happen?
using { /Fortnite.com/Devices }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /Verse.org/Random }
using { /Verse.org/Simulation }
custom_rng_device := class(creative_device):
@editable
ActivateTrigger:trigger_device = trigger_device{}
@editable
ChoiceTriggers:[]trigger_device = array{}
@editable
ChooseOptionsOnce:logic = true
var UnusedTriggers:[]trigger_device = array{}
OnBegin<override>()<suspends>:void=
Sleep(0.0)
DeviceSetup()
DeviceSetup():void =
ActivateTrigger.TriggeredEvent.Subscribe(ChooseTrigger)
set UnusedTriggers = Shuffle(ChoiceTriggers)
ChooseTrigger(MaybeAgent:?agent):void =
if (ChosenTrigger := UnusedTriggers[0], Agent := MaybeAgent?):
ChosenTrigger.Trigger(Agent)
if (ChooseOptionsOnce?):
set UnusedTriggers = for (Index -> Trigger : UnusedTriggers, Index <> 0):
Trigger
else:
set UnusedTriggers = Shuffle(ChoiceTriggers)
ChooseTrigger(MaybeAgent)
Maybe the issue does not lie with the triggers. It also might be uefn.