How to freeze enemy in blueprint?

Hi!
I know a method that pauses the entire game but that is no good for me.
I need a blueprint that freezes only a specific AI characer group.
Thanks for the answers!

Thank you for the answer!
In fact I’m a very beginner to UE4 and did not quite understand how to achieve this.
I have a level blueprint wich contains an event —“E” key pressed— to pause the game. But I have other animations on the pause menu widget from a source in the level. So I need to pause only the specific AI members.
So I must somehow tell the AI_Blueprint to stop moving … from the level blueprint keypressed event.

I’m really new to this kind of programming and cannot figure it out. I was trying to press-and-hold the flow node from the levelblueprint and drag my mouse onto the AIBlueprint and expected some “magic in the background” :smiley:
This could be the next versions best improvement haha :slight_smile:

Ok now I know something about communicating between blueprints. I managed to freeze my enemy, BUT it works now only when my enemy is in front of me.
Because I use SphereTracebyChannel method. As you know it has an out hit hit actor output. Also if I set sphere radius to a high value it wont work as it expected.

The best learning process when I learn that what I want to achieve isn’t it? :slight_smile:
So please tell me is there an other way to select all enemies_BP that is placed on a level and send them this pause anim signal through interface messaging?

By the way my new setup now is that I have a player blueprint wich listens for the esc-key, then it passes the boolian TRUE by interfaces to the enemy blueprint. As told it still uses a sphere trace wich works only if enemy is right in front of me.

Thanks a lot!

WOW it’s working :slight_smile: now could you help in other part of this problem?

I need to possess back those AIs…

Hi,

It’s quite simple. There is a node called ‘set pause anims’ ( you need to uncheck context sensitive to see it).

200830-pause.png

Plug the skeletal mesh which contains animation into it. If you want to freeze a specific AI blueprint actor, then use a branch and check the blueprint class equal to that AI blueprint, then use the node. You may also want to Unpossess the AI after freezing, in order to stop them from rotating and casting spells. No need to mention that you need to communicate between blueprints.

Regards,

You need to be a little moderate in blueprint scripting in order to make what you want happened. I suggest you not to rush to do complicated things if you are new to UE as you say. Instead try to do simple tasks first, watch YouTube tutorials on different parts of the engine, learn how to communicate between different BP classes and then after a while you will grasp the ability to do more complicated tasks. If you are a fast learner, I guess it would take you a couple of weeks full time to be able to achieve what you want. First you need learn how to put steady steps if you plan to be a good runner. ;D

Regards,

Actually when you use ‘SphereTraceByChannel’, it will affect objects in a radius from your pawn not just those which are in front of your pawn. Besides, you’d better to use a ‘MultiSphereTraceForObjects’ rather than a ‘SphereTraceByChannel’, although it’s only useful when you are going to create a spatial freezing spell around your pawn. Moreover, neither will do the thing you want. What you really need is to use ‘GetAllActorsOfClass’ node (which selects all actors of the same class all over your level), then use a ‘ForEachLoop’ node and plug the array elements pin into the interface BP and inside your AI BPs, plug the interface to the node I have showed you above. But you’d better to use a cast to node instead of an interface, because in your case, it’s more straight forward.

Regards,

Please mark the question as resolved, if this solved your problem and good luck.

how did you do this though? Im trying to freeze my ai when i look at it but am really struggling