[JASS] Dark Conversion, how to target Commoner?

Status
Not open for further replies.
Level 14
Joined
Jul 26, 2008
Messages
1,008
So I'm duplicating the Dark Conversion effect. What I want to do is simply kill the unit and create a new unit in it's place. However, the spell should work like Dark Conversion and only target Commoner.

The only problem is, how do I check to make sure the unit is a commoner? There is no UNIT_TYPE_COMMONER, and common.j doesn't list a commoner classification. I suppose I could always do an If IsUnit() against rawcodes, but if I was to do Orc it would be ungodly long.

What are some viable solutions? Sure I could use a dummy spell with Dark Conversion, but I'd like to avoid filling up the object editor.
 
Actually, the solution is a loooot simpler than that. All you have to do is to change the units' race to "Creep" (or neutral passive, maybe). "Commoner" is another name for the creep race.
 
I don't have JASScraft installed, so I'm not really sure, but I believe there is a race check function.
 
Status
Not open for further replies.
Back
Top