• 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.

Add unit classification worker via jass?

Rheiko

Spell Reviewer
Level 27
Joined
Aug 27, 2013
Messages
4,223
Anything you can do in GUI should also be possible to do in JASS since GUI will be converted to JASS when you compile the map anyway (unless you use Lua).
JASS:
// Function to add unit classification
call UnitAddType( whichUnit, whichType )

// Types / Classifications (most of them if not all)
UNIT_TYPE_ANCIENT
UNIT_TYPE_ATTACKS_FLYING
UNIT_TYPE_ATTACKS_GROUND
UNIT_TYPE_DEAD
UNIT_TYPE_ETHEREAL
UNIT_TYPE_FLYING
UNIT_TYPE_GROUND
UNIT_TYPE_HERO
UNIT_TYPE_MAGIC_IMMUNE
UNIT_TYPE_MECHANICAL
UNIT_TYPE_MELEE_ATTACKER
UNIT_TYPE_PEON
UNIT_TYPE_PLAGUED
UNIT_TYPE_POISONED
UNIT_TYPE_POLYMORPHED
UNIT_TYPE_RANGED_ATTACKER
UNIT_TYPE_RESISTANT
UNIT_TYPE_SAPPER
UNIT_TYPE_SLEEPING
UNIT_TYPE_SNARED
UNIT_TYPE_STRUCTURE
UNIT_TYPE_STUNNED
UNIT_TYPE_SUMMONED
UNIT_TYPE_TAUREN
UNIT_TYPE_TOWNHALL
UNIT_TYPE_UNDEAD

worker should be peon iirc.
 
Last edited:
Top