x

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"

AI won't move when spawned by game

Hi,

I've been using these videos to adapt a 3rd person character template into an AI that attacks the player, and wanders when it can't see the player.

https://www.youtube.com/watch?v=3GV6-4uhkYc

https://www.youtube.com/watch?v=xPb3sV4lZuY

This all works fine when I place the AI into the map before running the game, But if I try to use blueprints to spawn them in while the game is running they don't do anything.

The AI are spawned in using the Waves blueprint (which is a game state class)

When looking at the debugging screen I can tell that the event tick runs as expected the first time, but once the AI is given a location to move to, it get's stuck at the check for if the AI is currently moving.

From what I can see, the AI isn't sensing the player at all

Can anyone see what I've done wrong?

I'm relatively new to game dev and UE so if I've missed any information, I'll be happy to provide.

Thanks

Waves Class: http://i.imgur.com/urfRC7j.png

Third Person Event Tick: http://i.imgur.com/hg2eK0v.png

On See Pawn Event: http://i.imgur.com/6OQrThn.png

Product Version: UE 4.16
Tags:
more ▼

asked Jul 02 '17 at 02:37 PM in Blueprint Scripting

avatar image

jamiemac262
6 1 4 3

avatar image jamiemac262 Jul 03 '17 at 01:06 AM

Does anyone know what might be causing this problem?

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

1 answer: sort voted first

I found the answer on a different question.

For anyone who might be experiencing the same issue. You need to set the AI to posess the actor when it is spawned in

You can do this under "Pawn" in the Class Settings in the blueprint

alt text

solution.png (20.1 kB)
more ▼

answered Jul 03 '17 at 11:35 AM

avatar image

jamiemac262
6 1 4 3

avatar image FatBalloon Jan 21 '18 at 05:07 AM

You are awesome to me right now. Thank you!

(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