Page 1 of 1

Spring.SetUnitCloak change please?

Posted: 11 May 2009, 17:00
by smoth
Spring.SetUnitCloak

( number unitID,
boolean cloaked | number scriptCloak,
[ number decloakDistance | boolean decloakAbs ] ) -> nil


If the 2nd argument is a number, the value works like this:
1:=normal cloak
2:=for free cloak (cost no E)
3:=for free + no decloaking (except the unit is stunned)
4>=ultimative cloak (no ecost, no decloaking, no stunned decloak)
this is all well and good, but I was in a situation where I had to choose one feature over another because I wanted #4 but with a unit being able to spot the target at a distance....

Would it be a lot of trouble to add an option where: cost, no decloak, no stunned could be set as params for more power use rather than just this value based configuration?

Re: Spring.SetUnitCloak change please?

Posted: 11 May 2009, 17:09
by lurker
enum ScriptCloakBits { // FIXME -- not implemented
// always set to 0 if not enabled
SCRIPT_CLOAK_ENABLED = (1 << 0),
SCRIPT_CLOAK_IGNORE_ENERGY = (1 << 1),
SCRIPT_CLOAK_IGNORE_STUNNED = (1 << 2),
SCRIPT_CLOAK_IGNORE_PROXIMITY = (1 << 3),
SCRIPT_CLOAK_IGNORE_BUILDING = (1 << 4),
SCRIPT_CLOAK_IGNORE_RECLAIM = (1 << 5),
SCRIPT_CLOAK_IGNORE_CAPTURING = (1 << 6),
SCRIPT_CLOAK_IGNORE_TERRAFORM = (1 << 7)
};

Re: Spring.SetUnitCloak change please?

Posted: 11 May 2009, 17:25
by smoth
We have this!?!?
*edits* whoops I didn't parse the comment... lol

Re: Spring.SetUnitCloak change please?

Posted: 12 May 2009, 22:18
by REVENGE
Fuck, that's where you get that shit from.