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

[Solved] Attack Type Index Integers

Status
Not open for further replies.
Level 21
Joined
Mar 16, 2008
Messages
955
Maybe this will be useful to someone else since I can't find this anywhere.

0 - sets back to normal possibly default for that unit?
1 - normal
2 - piercing
3 - siege
4 - magic
5 - chaos
6 - hero
7 - n/a

Also it seems some units start at weapon index 0 and some start at 1.
 
Level 29
Joined
Sep 26, 2009
Messages
2,595
It is defined in common.j file as constants, you can see it for example here jassdoc/common.j at 8a4da7d7ea7f3cfeb55084cfb34857f1c2cfaa9c · lep/jassdoc
Do note that ATTACK_TYPE_NORMAL is "Spells" attack type in GUI/WE, while ATTACK_TYPE_MELEE is "Normal" attack type in GUI/WE

Also it seems some units start at weapon index 0 and some start at 1
I think some units have both - for example one for attacking ground units and other for attacking flying units. I think Rexxar unit had this. And I think peasants/peons also have this, where the second attack type allows them to target trees.

As for index 0 and 1, I assume you mean which index you set when using GUI actions like 'Set unit weapon integer field' etc.? Because I know for a fact that Blizz was there very inconsistent, so some actions expect 0-based indexing while other actions 1-based indexing
 
Status
Not open for further replies.
Top