Hello all,
I made a item can speed up AI for 5 seconds.
The issue is the speed won’t change after 5 seconds.
Here is the BP, i don’t know how to fix.
Thanks for replying.
Think of it this way currently your increasing the speed but it has no way to go back
- Max speed is say 100
- You set max speed x2 = 200
- You delay
- You set max speed to max speed which is 200. Again
You want to store a base speed.
It variable base speed is 100
Then set max speed to base speed X 2
Then after delay set max speed to base speed
Yes.
But the speed is still double max speed in this BP.
I was confused.
Base you are setting the speed to a variable you doubled.
When you set max speed it is that value, not the default.
Start game max speed is 300
You set max speed to max speed x2
Max speed is now 600
You set max speed to max speed. You set it to 600 again because you previously changed its value to that.
So you need a variable that you are not changing. In order to go back. Or use the opposite after the delay and set max speed to max speed / 2
Are you running this on Tick? Or is this a Custom Event? Also, you are casting to *TopDownCharacter *but never actually use it.
It still doesn’t work.
Orz…
Help…
So your character speeds up but doesn’t slow down?
Well in the latest picture I don’t see it updating speed as its updating the controller and not the pawn.
Make a event in the player character blueprint called sprint
Sprint- get character movement get max walk speed, set max walk speed max walk speed x2, delay. Set max walk speed max walk speed divided/2