Walk Speed dosent set when i pick up the item

The ai has to first see me to set the speed according to how many of an item i have




Hey @adnemannen,

A few questions to get things started:

  • You are using the walk and run speed variables for your AI right?
  • Is all of this code in your AI?
  • Is the speed for 0 and 1 item supposed to be seemingly maxed out (500 walk speed)?
  • Have you tried calling the event on item collection rather than constant calls so it is a bit more reliable of when the update happens?

Any additional specifics you provide may go a long way in solving your problem.

i use the walk and run speed for the ai.

all of this code is for the ai

yes the 0 and 1 is meant to be maxed out while i test

i havent tried calling the event on item collection

Hey @adnemannen,

Okay. So if everything is self contained in your AI blueprint I would suggest trying the following.

  1. Create a blueprint interface that, when your player collects an item, triggers a custom event in your AI that updates a variable that has the number of items collected and updates the speed accordingly.
  2. Do the same as the above but from the items themselves when you update the number for your player.

Hey @Quetzalcodename

can you give me some pointers for where to start. I’m kinda new so i don’t know how

Hey @adnemannen,

Check out these non-Epic affiliated tutorials for interfaces to help get you started:

I hope the above is the solution you need!

Hey @adnemannen!

Checking in. Are you still having trouble with your walk speed? Was the above the solution you were looking for?