• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Trigger] Destructible is Alive

Status
Not open for further replies.

sentrywiz

S

sentrywiz

Hi all.

Having trouble with this and idk why.

I have this trigger:

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Player1_UnitsTarget[(Custom value of (Triggering unit))] is dead) Not equal to True
      • (Player1_UnitsTarget[(Custom value of (Triggering unit))] is alive) Equal to True
    • Then - Actions
      • Unit - Order (Picked unit) to Harvest Player1_UnitsTarget[(Custom value of (Picked unit))]
    • Else - Actions
      • Trigger - Run FindSimilarResource <gen> (ignoring conditions)
It doesn't work. The units that attack the destructible simply stop aka the FindSimilarResource trigger fires. Idk why. The destructible is clearly alive and I even checked via test triggers.

(Player1_UnitsTarget[(Custom value of (Triggering unit))] is an array where I store destructibles once a unit casts a harvest spell on it.

P.S -- If I remove the condition, the trigger works but even after the destructible dies, units keep coming back to its location and still attack it...

EDIT:

I solved it, but by checking if destructible is alive when spell is cast, not in the loop. I still don't get it why the loop doesn't work.
 
Status
Not open for further replies.
Back
Top