• 🏆 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!

[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