• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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