Why am I having a problem casting with Blueprints?

I made a video showing my blueprints.

Pretty much, I was following along with tutorials, and started trying to add functionality where i could on my own.

I made a physics volume, and want to make sure the BeginOverlap target is the player. Castto Playercontroller wasn’t working,
so i might be doing it wrong.

That’s the short version. the longer version w/ my blueprint is in the video. :slight_smile:

Hello,

The player controller is not actually overlapping the volume, only the Character is. You would need to do a Cast To for the Character Blueprint that you are playing with instead of the controller. Let me know if that works for you.

wow, i didn’t know you could cast to that. You can cast to any blueprint?

Anyway, the sound will only start when the player enters the Physics Volume, but I can’t get the audio to stop playing on an End Overlap (that’s cast to the Character as well)

Thanks for your help ! :slight_smile:

You can cast to any blueprint?

You can cast to anything as long as you can reference it properly. When an actor enters an overlap, you can easily cast to whatever that is from the event.

I tried doing this in my own level and here is what I came up with:

The Sound Cue I am using is in the level already, with Autoactive unchecked. Normally, I just put the environment audio in the level and turn it off by default, then turn it on when needed.

The problem you are seeing is that the spawned in Audio Component instance isn’t being referenced properly, so it Autoplays when spawned (The “Play” node in your level is redundant), but the Stop node is not actually telling that particular instance to stop.

Let me know if that helps you.

Hey ,

Thanks for taking another look. You were right, it was referenced poorly. I deleted the “create sound cue” and just dragged the sound cue in. References to that sound worked fine. Thanks! :slight_smile: