Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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.


Product Version: UE 4.11
more ▼

asked Apr 25 '16 at 01:18 AM in Blueprint Scripting

avatar image

10 1 4 8

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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 :)

more ▼

answered Apr 25 '16 at 02:08 AM

avatar image

1.8k 66 27 90

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question