Hi guys. I am adding some things to the Oil Barrels, like sound effects etc. How do i despawn them after leaving a room? So i have everything working when the barrel explodes, but when i leave the room through a door with a cutscene, i want the barrels and fire etc to despawn. I have tried various options in the Barrel BP, but nothing seems to work
@ben4886 Hey Ben, If I understood correctly, you want the barrel's exploded fire effects to be removed from the level after it explodes. In that case, open BP_OilBarrel and go to the ForceExplosion custom event. After the DestroyedChunksTemp loop, you can add a delay for example 5 seconds, then destroy the fire and smoke emitters and finally destroy the actor itself. Or, if you want the barrel to be removed after a specific event rather than a timer, you can connect the barrel to the actor that triggers the event and call the destroy logic at the exact moment you want it to disappear.
@farshad I have added the sound of fire to the barrel, activated once it explodes. If I leave the room (with door opening cutscene) you can still hear the fire sound. I want to deactivate the sound (and fire) once we leave the room
@ben4886 There are a few ways to handle soundspart. The simplest solution is to use Unreal's sound attenuation, so the sound gradually fades out as the player moves away from the area.
Another option tha help the effect as well is to link the barrel to door(s) or another event actor. Then, when a specific door is interacted with (or a cutscene starts), you can disable or destroy the assigned barrel, along with any fire or effects it spawned.
@farshad I’m away at the moment, so can’t check it. But in the door BP is there logic for something like “cutscene triggered”, or “interacted with”?
@hosna Hi! I tried going through the video with your spline/camera setup and ran into a snag. I've triple checked my project to the video you made and everything looks correct but when I play and overlap the switcher, my camera stays static. I noticed you had set up some variables for CameraSlineSpeed and SplineDistance, but I didn't see where they were used or if they were used at all, and then the in editor set up was not very clear. I really love this idea and would love to implement it in my game, so any help would be super appreciated!
P.S. Not sure how the forum works, but this is in response to your exchange with @the_javawockee regarding moving the cameras!