Fairly new to unreal 4, and having issues trying to get the mine to stop the slow character movement speed that I set it too. Just wanting the speed to return to normal after say 10 seconds. If anyone can shed some light on this I would be grateful.
After destroy actor, are you respawning or starting the level again?
The actor is the mine static mesh, has no respawning all that basically happens is the mine gets destroyed and the characters movement is affected .
Have a look at SetTimerDelegate (https://docs.unrealengine.com/latest/INT/BlueprintAPI/Utilities/Time/SetTimerDelegate/index.html)
You can create a custom event (Right click and search for custom event) and link it to the timer. Enter 10 into the timer and the event will get called after 10 seconds. Use the event to reset the character walking speed.
Hope this helps.
Ok got you.
Make a function that has a 10 second timeline, then resets max walk speed
You would need to do in player. Not in the BP bad thing.
set a bool in you blueprint that casts to player and runs function / custom event to set timer and slow speed
I’m sure it’s so simple, but just can’t get my head around it!
I have tried the custom event, nothing happens, but think it’s the way I have done it…
I skipped the part where you destroyed the actor…
As Narghile mentioned, you need to move that logic to the character bp (since the mine actor is destroyed you can’t call an event there after 10 seconds)
So create two custom events in your character bp:
First event: Reduce walking speed -> Here you reduce your walking speed and afterwards you call “Set Timer Delegate” and connect that one to the second event (Reset walking speed)
Second event: Reset walking speed -> Reset the walking speed
In the mine blueprint you call “Reduce walking speed” from your character bp.