Reset Position IA LEVELMAP

Hello all ! I need you help !

I am developing a game arena has two levels on the same map I use the same enemies and I position it on a point
(eg: Enem01: x0 y8 z10 / Enem02: x0 y12 z20 / Enem03 …) once the player enters the zone AI that moves to the character, but if they leave the arena area they disappear I would create a system that will reset AI disappear so they reappear in the point I indicated in the map.

THANKS !

In your AI controller or character, you need to create a vector variable called “initial location” which on begin play, get the AI controller or pawn location and set it to the variable.

At some stage when resetting the positions, you’d have an event somewhere that would “get all actors of class” and chose your AI character class, then call a function in it such as “reset position”.

That reset position function in the AI character is a function you create which will Set Actor Location back to the original position vector variable you have set at begin play. Essentially, you’re repositioning your AI character as they were in the begin play state.

Hope this helps :slight_smile: