Map Database  •  FAQ  •  RSS  •  Login

Get unit position

<<

Sho_Ke

Peasant

Posts: 3

Joined: 22 Dec 2013, 08:39

KaM Skill Level: Average

Post 25 Jan 2014, 17:04

Get unit position

According to this page, there are functions to get the unit or house ID of the unit or house at a given X, Y coordinate. Is there a way to go from unit/house ID and get the X, Y coordinate of it?

Thanks,
Sho Ke
<<

RandomLyrics

User avatar

Sword Fighter

Posts: 298

Joined: 21 Jul 2013, 02:15

KaM Skill Level: Fair

Post 25 Jan 2014, 18:35

Re: Get unit position

Yes.
  Code:
States.UnitPositionX(UnitID) States.UnitPositionY(UnitID) States.HousePositionX(UnitID) States.HousePositionY(UnitID)
<<

Sho_Ke

Peasant

Posts: 3

Joined: 22 Dec 2013, 08:39

KaM Skill Level: Average

Post 25 Jan 2014, 18:48

Re: Get unit position

Wow I completely overlooked that section under States :$ Thanks.

Return to “Dynamic Scripting”

Who is online

Users browsing this forum: No registered users and 6 guests