I am also seeing this. With one device that randomly sets an int on trigger and prints it on another trigger it works fine. When I add a second device that calls print via its own trigger all the values are default.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using {/Verse.org/Random }
using { /EpicGames.com/Temporary/Diagnostics }
simple_data_device := class(creative_device)
{
@editable DisplayValueTrigger:trigger_device = trigger_device{}
@editable SetRandomValueTrigger:trigger_device = trigger_device{}
var Value:int = -1
OnBegin<override>()<suspends>:void=
{
DisplayValueTrigger.TriggeredEvent.Subscribe(OnDisplayData)
SetRandomValueTrigger.TriggeredEvent.Subscribe(OnSetDataRandomly)
}
OnSetDataRandomly(TriggerPlayer:player):void=
{
set Value = GetRandomInt(0, 100);
Print("Set Value: {Value}")
}
OnDisplayData<public>(TriggerPlayer:player):void=
{
Print("Current Value: {Value}")
}
}
Second device referencing this one.
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /EpicGames.com/Temporary/Diagnostics }
simple_secondary_device := class(creative_device)
{
@editable
SimpleDataDevice:simple_data_device=simple_data_device{}
@editable DisplayValueSecondaryTrigger:trigger_device = trigger_device{}
OnBegin<override>()<suspends>:void=
{
DisplayValueSecondaryTrigger.TriggeredEvent.Subscribe(OnDisplayDataSecondary)
}
OnDisplayDataSecondary<public>(TriggerPlayer:player):void=
{
Print("Calling DisplayData Through Secondary Device...")
SimpleDataDevice.OnDisplayData(TriggerPlayer)
}
}
While waiting for this fix to reach release it should be possible to workaround this issue by using a one element array rather than the direct reference.
Our current fix has been to use trigger devices as a way to signal events between custom devices. Not ideal, as you can’t pass any additional information.
Also in the future we would like to have the ability to create custom listenable events on our devices if possible.
There was an issue with circular references between devices which like you said, leads to one of the devices disappearing. This should be fixed in a later release.
Individual non-circular references from one custom device to another should still work fine in the mean time.