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

[Trigger] Random Exploding Illusions

Status
Not open for further replies.
Level 3
Joined
Sep 3, 2004
Messages
50
Well, with the use of 2 triggers my intent was to have illusions die once they inflict damage on an enemy unit or whenever they receive any damage (I relize I can set the value of mirror image damage taken to like 99999999). Here are the triggers:

  • Damage Trigger2
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is in DamageGroup) Equal to False
        • Then - Actions
          • Trigger - Add to Damage Trigger3 <gen> the event (Unit - (Triggering unit) Takes damage)
          • Unit Group - Add (Triggering unit) to DamageGroup
        • Else - Actions
  • Damage Trigger3
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (((Triggering unit) is an illusion) Equal to True) and (((Unit-type of (Triggering unit)) Equal to Aspect of Cunning) and (((Triggering unit) is alive) Equal to True))
        • Then - Actions
          • Wait 0.30 seconds
          • Unit - Kill (Triggering unit)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (((Damage source) is an illusion) Equal to True) and (((Unit-type of (Damage source)) Equal to Aspect of Cunning) and (((Damage source) is alive) Equal to True))
        • Then - Actions
          • Wait 0.30 seconds
          • Unit - Kill (Damage source)
        • Else - Actions


Well, this works seemingly perfect the first time. After that, the images will just randomly explode for no reason. Sometimes it only explodes the ones you currently have selected, while other times it just causes them all to explode at once immediantly after you split using mirror image.
 
Last edited by a moderator:
Level 3
Joined
Sep 3, 2004
Messages
50
Dont use that at any costs. It leaks event. Can only be done in jass

...Well that's not helpful at all. If I was any good with JASS I'd obviously use it over gui. It would however be helpful to povide some code to get this. My knowledge of JASS is probably too limited ight now to attempt this. I know of the guides on this site so please don't direct me to one.
 
Level 6
Joined
Mar 2, 2006
Messages
306
yeah what's with that "Damage Trigger2"? just make an event saying "unit spawns a summoned unit" and condition "unit-type of summoned unit == whatever" and then register that event. there is no visible need for unit group. i also don't get the second part of "Damage Trigger3" - illusion taking damage from another ilusion?
 
Status
Not open for further replies.
Top