Knuckle Cracker

Creeper World 3 => The Coder's Corner => Topic started by: Clean0nion on December 05, 2013, 03:37:24 PM

Title: (solved - GetUnitAttribute) Quick Q - How do I find out where a unit is?
Post by: Clean0nion on December 05, 2013, 03:37:24 PM
I have the UID of a unit. How do I find its coords?
Title: Re: Quick Q - How do I find out where a unit is?
Post by: kwinse on December 05, 2013, 03:45:55 PM
<-UID CONST_COORDX GetUnitAttribute <-UID CONST_COORDY GetUnitAttribute

If I'm understanding the docs (http://knucklecracker.com/wiki/doku.php?id=crpl:docs:getunitattribute) right anyway. EDIT: Not sure if you need quotes around the CONSTs or not...
Title: Re: Quick Q - How do I find out where a unit is?
Post by: Clean0nion on December 05, 2013, 06:17:58 PM
Quote from: kwinse on December 05, 2013, 03:45:55 PM
<-UID CONST_COORDX GetUnitAttribute <-UID CONST_COORDY GetUnitAttribute

If I'm understanding the docs (http://knucklecracker.com/wiki/doku.php?id=crpl:docs:getunitattribute) right anyway. EDIT: Not sure if you need quotes around the CONSTs or not...
Thank you very much! I never considered GetUnitAttribute. And no, you don't. They're not even case-sensitive.
Thanks!