• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[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