Page 1 of 1
UNIT_TYPE constant for get
Posted: 27 Jul 2006, 09:26
by KDR_11k
Would be nice if we could determine a unit's type via get UNIT_TYPE (unitID), the UNIT_HEIGHT workaround is kinda dirty. I'm not sure what kind of return type we'd get, though. Variables can only be integers, right?
Posted: 27 Jul 2006, 10:32
by Gnomre
Well, a quick way to test the number only theory, using a shield unit:
static-var blah;
#define CHECK text
Create() {
blah = text;
}
AimWeapon1() {
if(blah == CHECK) {
return TRUE;
}
}
If the shield turns on, then it accepts text.
Regardless, I agree, it'd be nice to be able to do this.