• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Trigger] Check for researching/upgrading?

Status
Not open for further replies.
That would be wonderful, if you have the time. Please and thank you...

I suppose I could just use custom values for the unit in addition to the (begins/finishes researching), but I am hoping there is a cleaner way of doing it.
 
Last edited:
Here it is, it uses HandleVars, so make sure you have them in your map's custom sript section. It also uses two global variables:
TempUnit unit
IsResearching boolean

  • ResearchEvent
    • Events
      • Unit - A unit Begins research
      • Unit - A unit Cancels research
      • Unit - A unit Finishes research
    • Conditions
    • Actions
      • Custom script: call SetHandleBoolean(GetTriggerUnit(), "Research", GetTriggerEventId() == EVENT_PLAYER_UNIT_RESEARCH_START)
  • ResearchCheck
    • Events
      • ...
    • Conditions
    • Actions
      • Set TempUnit = <The unit you want to check>
      • Custom script: set udg_IsResearching = GetHandleBoolean(udg_TempUnit, "Research")
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • IsResearching Equal to True
        • Then - Actions
          • -------- TempUnit is researching --------
        • Else - Actions
 
Status
Not open for further replies.
Back
Top