• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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