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

[General] IsUnitType - understanding problem

Status
Not open for further replies.
Level 16
Joined
May 1, 2008
Messages
1,605
Moin moin =)

JASS:
if IsUnitType(u,UNIT_TYPE_HERO) == true then
    //action 1
else
    //action 2
endif
Okay the little understanding problem I have, is the "else - part". Does this else check if the unit u is not a hero now? or does it check if the unit u is any other type unit as long its not a hero (like illusions or summons)?

Greetings - Thanks - Peace
Dr. Boom
 
Level 16
Joined
May 1, 2008
Messages
1,605
as long as the condition is false, it will run the else part

Well that is clear, the thing is the actions should just run for heroes and non heroes excluding types like illusion or summons, so wondering if the else part include or exclude the unit types I don't want, because illusions and summons aren't heroes but still a different unit type as UNIT_TYPE_HERO == false
 
Status
Not open for further replies.
Top