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!
@ben4886 The section responsible for playing the door cutscene is located in AC_Interact, inside the InteractPlatform graph.
There, the system checks the ShowPlatformCutscene variable that is set on the door/platform class. If this variable is set to true, the door cutscene will be played during the interaction.
@mr_spookies Hey, I'm glad you liked the idea.
Did you set the local variable ClosestDist to a very large number like 900000000000.0? try using a Print String to see how the output of GetClosestPointAlongSpline changes in the Event Tick.
Make sure the coordinate space for Get Location at Distance is set on world. I did not use the speed variable. That was just for another test 😊
@hosna Many, many thanks! Will give those a shot and see what happens! I do have one other question which is unrelated to the cameras. It's more of a preference issue. I'd like to strip back a few things in the framework, specifically the decision screen for the Monster/Nemesis character, and the item pickup question. Before I go hacking away wildly at the code, I thought I'd ask for any recommendations or advice from the creators.
The intended behavior for each would be: Monster - Introduction cutscene plays, then immediately into gameplay and it's chasing, no questions, and Items - just plays animation and picks up (if there is space in inventory), I do still like the notification that says that you've picked up an item, but I'm aiming for as little friction (button presses and extra widgets) as possible. I don't necessarily need a detailed breakdown, just a nudge in the right direction so I'm not destroying all the working code.
Really appreciate you all!
@mr_spookies You're welcome! Yes, it is possible to do that.
For the item pickup widget, if you want to remove the prompt that asks whether the player wants to pick up the item, it's very simple. As shown in the screenshot I sent, go to AC_Interact and the Interact Item graph. You no longer need that specific branch there, just connect the execution flow directly. This way, the confirmation widget will not appear, and the item will be added to the inventory immediately after interaction. You can also create your own widget to simply notify the player that an item has been picked up.
As for removing the decision-making section during monster encounters, simply do not add the WB_MonsterOption widget to the viewport. Instead, return the player directly to gameplay.
This part can be found in BP_CutscenePlayer, in the Cutscene Monster Sample section.
I hope this helps!
Hello I do not know if this is a Bug but only one Storage box workd for me. I add another in level in never spawns there ive added it to my camea with eyedropper chose location, ticked has storage box nothing works ?
@deepspacedaz Hey,
To make sure the Storage Box setup has been done correctly, please use the actor from the Demo Map as a reference. First, make sure you have placed a Storage Box in your new level. Please note that there should only be one Storage Box on each level. Next, open the Demo Map, select BP_SaveInteract2, copy it, and then paste it into your new level through the Outliner.
After that, without changing the Storage Box Location variable, move only the Save Actor to your desired location. Once that is done, adjust the Storage Box location variable if needed and check whether everything works as expected.
If you still have the problem, please let me know and I will be happy to provide further guidance.
Here's 2 things i hope you can help me with. Firstly, the zombies dont spawn exactly where i want them to. In the screen shots you can see the locations in the level editor, and where they spawn
@ben I have same problem
