I’ve used direct event binding to get a Damage Volume device to damage players at 1 tick per second as soon as the player is seen by a Perception Trigger. I’m trying to get the Damage Volume to stop damaging the player as soon as the player is no longer seen by the Perception Trigger. For some reason I can’t get this to work. In playtests, I place a wall between myself and the Perception Trigger, I see and hear that the perception trigger has lost sight of me, but the Damage Volume continues to deplete my health.
What am I doing wrong?
everything looks good to me… maybe a bug?
try writing a verse script to Subscribe to the events of the perception trigger
basically what your doing in the editor but in verse
That’s what I was thinking, it must be a bug
Unfortunately, I haven’t learned Verse yet. So I’m kinda stuck. I asked ChatGPT for advice but wasn’t able to follow its directions, because I’m still new to UEFN, I can’t locate the files that it’s telling me to check on:
https://chat.openai.com/share/e53cb2b0-0560-49af-a061-5ae32588b2d4
Ok i wrote you a little script i’ve not tested it so there maybe stuff i forgot
you need to create a new verse script in the verse tab next to the outliner in the editor
name the file DamageVolumeController
then copy and paste the text below
using { /Fortnite.com/Devices }
DamageVolumeController := class(creative_device):
@editable
DamageVolume: damage_volume_device = damage_volume_device{}
@editable
PerceptionTrigger: perception_trigger_device = perception_trigger_device{}
OnBegin<override>()<suspends>: void=
PerceptionTrigger.DeviceSeesAgentEvent.Subscirbe(OnPlayerFound)
PerceptionTrigger.DeviceLosesSightOfAgentEvent.Subscribe(OnPlayerLost)
OnPlayerFound(Agent:agent):void=
Print("I See You!")
DamageVolume.Enable()
OnPlayerLost(Agent:agent):void=
Print("Where You Go?")
DamageVolume.Disable()
then in the verse tab at the top of the editor klik build verse script
once you’ve done that you should have a creative device in the content brower
drag that into your map and klik on it
in the details you need to add the damage volume and the perception trigger
then test let me know if it works
It works perfectly! Thank you so much!
Glad i could help i have posted a link to this thread in the bug reports
1 Like