Character Position

Forum closed. All further discussion to be discussed at https://github.com/OpenKore/

Moderator: Moderators

Locked
Message
Author
setsunaseiei
Human
Human
Posts: 38
Joined: 17 May 2011, 07:09
Noob?: No

Character Position

#1 Post by setsunaseiei »

DevTeam,

How do you obtain a characters coordinates?

For example, if I use macro plugin, I could easily get it by using the $.pos variable.
However, in the case of different player's coordinates, I really don't know or haven't read yet.
I think it would be analogous to kore's following algo.
So I have two cases,
one : following master, how does kore find his master through party?
two : a player went near me (player coordinates are displayed in pl) but how to obtain via functions?

Thanks, DevTeam. I'm still learning both Kore and Perl on Win32.
オペンコレ!

EternalHarvest
Developers
Developers
Posts: 1800
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: Character Position

#2 Post by EternalHarvest »

Actor.pm:

Code: Select all

##
# Hash* $Actor->{pos}
#
# The position where this actor was, before its last movement.
# This is a reference to a hash, containing the items 'x' and 'y'.

##
# Hash* $Actor->{pos_to}
#
# The position where this actor is moving to, or (if the actor has finished moving),
# where it currently is. This is a reference to a hash, containing the items 'x' and 'y'.
Information on players is stored in instances of Actor::Player class.

barakuda
Noob
Noob
Posts: 15
Joined: 25 Jun 2008, 21:23
Noob?: Yes

Re: Character Position

#3 Post by barakuda »

EternalHarvest wrote:Actor.pm:

Code: Select all

##
# Hash* $Actor->{pos}
#
# The position where this actor was, before its last movement.
# This is a reference to a hash, containing the items 'x' and 'y'.

##
# Hash* $Actor->{pos_to}
#
# The position where this actor is moving to, or (if the actor has finished moving),
# where it currently is. This is a reference to a hash, containing the items 'x' and 'y'.
Information on players is stored in instances of Actor::Player class.
What is the possible codes for that?

ever_boy_
Developers
Developers
Posts: 309
Joined: 06 Jul 2012, 13:44
Noob?: No

Re: Character Position

#4 Post by ever_boy_ »

barakuda wrote:
EternalHarvest wrote:Actor.pm:

Code: Select all

##
# Hash* $Actor->{pos}
#
# The position where this actor was, before its last movement.
# This is a reference to a hash, containing the items 'x' and 'y'.

##
# Hash* $Actor->{pos_to}
#
# The position where this actor is moving to, or (if the actor has finished moving),
# where it currently is. This is a reference to a hash, containing the items 'x' and 'y'.
Information on players is stored in instances of Actor::Player class.
What is the possible codes for that?

Code: Select all

$x = @eval ($::players{$::playersID[$.lastMatch3]}->{pos_to}{x})
$y = @eval ($::players{$::playersID[$.lastMatch3]}->{pos_to}{y})

barakuda
Noob
Noob
Posts: 15
Joined: 25 Jun 2008, 21:23
Noob?: Yes

Re: Character Position

#5 Post by barakuda »

$x = @eval ($::players{$::playersID[$.lastMatch3]}->{pos_to}{x})
$y = @eval ($::players{$::playersID[$.lastMatch3]}->{pos_to}{y})
Not working

Locked