[Need Help]Speed up, i made it. But...

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.936af6b1b40eb2aa2d9f2de441c96a70f34b3905.jpeg
Thanks for replying.

Think of it this way currently your increasing the speed but it has no way to go back

  1. Max speed is say 100
  2. You set max speed x2 = 200
  3. You delay
  4. 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

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

I see. I tried this way in this BP.
But still doesn’t work.

Are you running this on Tick? Or is this a Custom Event? Also, you are casting to *TopDownCharacter *but never actually use it.

No. Here is full BP.
So you mean, i need to use Tick or Custom Event to run?

It still doesn’t work.

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