I have a group of volumes of type volume_device that I set in an array. When the player enters the volume I want to generate a signal that shares the location of the volume but I can’t find a way to get a reference to the volume from my array.
I always get that compile ERROR:
Ambiguous identifier; could be localhost.MyFirstProject.VolumeTest_device.SignaledVolumeEnter.Volume or localhost.MyFirstProject.VolumeTest_device.SignaledVolumeEnter.Volume(3588)
The code:
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/SpatialMath }
VolumeTest_device := class(creative_device):
@editable
VolumesArray :[]volume_device = array{}
# Runs when the device is started in a running game
OnBegin<override>()<suspends>:void=
for (index := 0..VolumesArray.Length-1):
if (Volume := VolumesArray[index]):
Volume.AgentEntersEvent.Subscribe(SignaledVolumeEnter)
SignaledVolumeEnter(Volume:agent) : void =
if (Volume := volume_device?):
Location:vector3 = Volume.GetTransform().Translation
Print("This is the location of the Volume: {Location}")
Is it the right way to do that ? Any suggestions?