Increase ai speed when overlapping

I’m hardly trying to find a way if I can increase the AI walking speed when the player overlaps an actor. And when that actor is being overlapped, it will get destroyed and increase the speed of the AI by a certain ammount. but whatever I’m trying it doesn’t want to work properly.

This is the blueprint(I put a print string to see if it fires, and it does----):

----Appearently the speed won’t change at all, coming with an error after stopping the game:

What am I doing wrong??

Is my problem that hard to be solved, or people who know blueprint way better than me think that I’m gonna find out the fixing already right before they will answer? Cause the fixing for this problem is unfindable on internet.

I know that I’ve been posting in this website very often ever since I started using unreal engine. But I don’t want to give up on this, I want to continue working on this cool program, I want to learn everything I need to become a true programmer. I don’t want to end up giving up just how I did in unity (Hope it’s allowed to pronounce the name here) so please, give me a chance to continue and fix this problem that I’m stuck on.

Hello,
Be sure that if someone has a good idea he would ever have give you.

I’ve been away for a long time so i may be wrong but in your second blueprint you put a destroy actor and then cast to another one. I would try to do the destroy at last to be sure that what is done after actually is not ignored as actor is destroyed.

That’s the problem, If I try to connect the custom event to “Cast To NPC” then the cast node won’t fire. It tells me that the cast to npc is not needed but it comes with an error when overlapping with the collectable actor

Detailed edit: It triggers without the cast node but comes with an error when overlapping occurs, but nothing happens if I add the cast node between the custom event and set max walk speed nodes

Yes, the easy part is already made, but still gives me error with the set max walk speed

This is how I placed the nodes in the AI BP, but nothing fires. The event Speed Change BI happens only in the player blueprint, because the player touches the collectable actor, and not the AI. But I want my AI to get affected by the event and not the player

As it shown in the screenshots above, the guardian is the player, the npc is the AI, and the collectable actor is just a simple actor that has the EventOnBeginOverlap.

This is how I made with the collectable actor, if the player overlaps with it, it should trigger the blueprint interface shown above and destroy the actor.

The main problem seem to be actually that the Speed Changing BI sends the trigger event to the player, but not to the AI, because the player is the one that overlaps the collectable actor and not the AI.

Creating a new blueprint interface, and connecting the Event Speed Change BI to it doesn’t seem to send any triggering event through the player blueprint at all.

I can’t show anymore screenshots cause i am on the phone, and its 23:34 here.

Full delete and edit: I now fixed the problem, both player and npc are now getting the trigger event from the interface.

Finally I solved the problem, not only that, but I now learned something new.

Thanks

Topic solved

I think I’ve accidently did something and now the SpeedChange_BI doesn’t fire anymore in the npc :frowning:

I changed my mind on adding a widget that tells the player how many objects he picked up, the widget now works perfect, but I think I kinda messed up in the CollectableBP and now it doesn’t send the trigger event anymore. I can understand that it sends to the player but the npc doesn’t get any triggering anymore.

I messed up so badly, and I can’t even remember how it was before I broken it…

I’m starting to lose my mind, and become completely dissapointed to myself that I managed to break the most important thing and now I can’t even remember how did I do it last time. Now I’m completely stuck in a never ending nightmare.

The SpeedChange Event from the npc doesn’t get any signal from the message interface at all even if I attached Get All Actors With Interface with it. Why did I had to remove those nodes?

What did I do in that blueprint from the attachement above this comment that it doesn’t send to my npc any interface messages to the event???

It seems like it wasn’t my fault at all. I opened up the thirdpersontemplate, and turns out that the blueprint I placed was actually correct, which means that UE4.19.2 have a bug with the get all actors with interface

Gotta report this quickly before they release 4.20!