Announcement

Collapse
No announcement yet.

Get Player Pawn

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Get Player Pawn

    Hi, I am currently trying to make an FPS game. I want the enemy to rotate towards the player, but when I try Get Player Pawn and check if its valid it returns false. Here is the part of my script I think is needed: http://prntscr.com/ba8tym What is the problem, and how can I fix it?

    #2
    You must get the correct Player reference you want your enemy to rotate, in this case Get Player Pawn could not return the correct Pawn reference by index.

    If you have no reference, try following this:

    Click image for larger version

Name:	1231231.jpg
Views:	1
Size:	59.9 KB
ID:	1107417

    I'm not sure AI have access to GameState, so maybe my pic could not work for you.

    I know its a lot of nodes to get one single reference, maybe you should store it inside your enemy class and get it instead of this solution.

    Comment

    Working...
    X