Errors on sound toggle

To sum it up, I have a ceiling lamp that plays a looped noise, I also have stairs in the room for the upper floor and desire the functionality of playing a sound near the lamp and upon going up the stairs it stops playing the sound (for example when I’m above it just on the ceiling).

I’ve set up a triggerbox1 BP for once the player exits the box it stops playing and upon re-entering it starts again, it works but I have a lot of errors in my log.

I have a bool var in my main FP BP class for when the player leaves the trigger box. This are my blueprints for the BP class

TriggerBox:

Lamp:

Logs:

The issue is obviously in the Lamp BP, but I don’t know how to modify it to a point where I get rid of the errors and still keep the desired functionality, so yeah it works but I would prefer for it to be working without errors.

So If any blueprint guru can help me out, I would appreciate it.

When you are setting it active the sound is not spawned yet. The outpin is only valid after the node has been executed

1 Like

(post deleted by author)

I’ve gone another route and made it to work, seems I over complicated the logic a bit

over complicated the logic

This could / should be done with a single BP, without any Ticking.

  • create a looping Sound Cue
  • have the trigger and the lamp in the same BP actor
  • place the actor where it needs to be, adjust trigger location as needed
  • trigger Being Overlap → spawn sound
  • trigger End Overlap → stop sound