DNS
Member
|
How to get player position
Hi!
I have NPC strict and i want do movement this object follow player.
How get player position?
I try use this
Reference<Player> target;
and in update
actionMoveTo(target.pos());
but this does not work.
error C2039: 'pos' : is not a member of 'EE::Reference<TYPE>'
|
|
07-17-2012 08:01 PM |
|
TBJokers
Member
|
RE: How to get player position
actionMoveTo(Players[0].pos);, or , actionMoveTo(plr.pos());
Man, it's always that semicolon...
|
|
07-17-2012 09:36 PM |
|
neo22
Member
|
RE: How to get player position
Hello,
you're using the template Reference<TYPE>, so use the operator () to get the value like this :
Code:
if(target.valid())actionMoveTo(target().pos());
|
|
07-22-2012 06:30 PM |
|