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

Custom Script

Status
Not open for further replies.
Level 6
Joined
Sep 19, 2007
Messages
215
IM just curious im using Zwiebelches Threat system that is here on the hive and i wanted to add a feature that heals when out of combat now i noticed it has a call function call ZTS_GetCombatState(unit U) i was wondering how could i use this in Gui to check if it comes back true or false
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
From the documentation:
JASS:
//      call ZTS_GetCombatState(unit U) returns boolean:
//
//          Returns the combat state of a player or npc unit.
//          Returns true, if the unit is registered and in combat.
//          Returns false, if the unit is not registered or out of combat.
  • Set YourUnitVariable = (triggering unit)
  • Custom script: set udg_SomeBoolean = ZTS_GetCombatState(udg_YourUnitVariable)
  • If (All conditions are true) then do (then actions) else do (else actions)
    • If - Conditions
      • SomeBoolean equal to false
    • Then - Actions
      • -------- Is out of combat --------
    • Else - Actions
      • -------- Is in combat --------
 
Status
Not open for further replies.
Top