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

Mirror Image - That Secrefice Itself

Status
Not open for further replies.
  • mirror
    • Events
      • Unit - Blademaster 0069 <gen>'s life becomes Equal to 0.00
    • Conditions
    • Actions
      • Unit - Make (Triggering unit) Invulnerable
      • Set A = (Player number of (Owner of (Triggering unit)))
      • Set ug = (Units owned by (Player(A)) matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is an illusion) Equal to True) and (((Matching unit) has buff Mirror Image) Equal to True))))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in ug) Not equal to 0
        • Then - Actions
          • Set p = (Position of (Triggering unit))
          • Set unit = (Random unit from ug)
          • Set real = (Life of unit)
          • Hero - Instantly revive (Triggering unit) at p, Show revival graphics
          • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + real)
          • Special Effect - Create a special effect at p using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation (udg_p)
          • Set p = (Position of unit)
          • Special Effect - Create a special effect at p using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation (udg_p)
          • Unit - Kill unit
        • Else - Actions
          • Game - Display to (All players) the text: none
      • Custom script: call DestroyGroup(udg_ug)
      • Wait 2.00 seconds
      • Unit - Make (Triggering unit) Vulnerable
The thing I tried to make is mirror image that will die instead of its summoner, and adding "revive hero" didn't help , the hero remained dead.
 
Level 13
Joined
Sep 13, 2010
Messages
550
Try using less than or equal to instead equal. If still not works fill your text with debug texts. If the condition is not working then try changing the unit pick condition for example I would remove the 'has buff' thing

Also mirror image will not die instead the hero like the killing enemy will gets the XP so on...
 
Explain: I try to make mirror image to instantly die when its caster about to.

  • mirror
    • Events
      • Unit - Blademaster 0069 <gen>'s life becomes Less than or equal to 0.41
    • Conditions
    • Actions
      • Set A = (Player number of (Owner of (Triggering unit)))
      • Set ug = (Units owned by (Player(A)) matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) has buff Mirror Image) Equal to True)))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in ug) Not equal to 0
        • Then - Actions
          • Set p = (Position of (Triggering unit))
          • Set unit = (Random unit from ug)
          • Set real = (Life of unit)
          • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + R)
          • Special Effect - Create a special effect at p using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation (udg_p)
          • Set p = (Position of unit)
          • Special Effect - Create a special effect at p using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation (udg_p)
          • Unit - Kill unit
        • Else - Actions
      • Custom script: call DestroyGroup(udg_ug)
this makes the hero die and nothing to occure
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
You should save the Hero into Unit variable
Then, use this:

First, your unit must be saved into a variable:
  • Set *YourUnit* = (Triggering unit) //or any other trigger-response unit
  • mirror
  • Events
    • Unit - A unit Dies
  • Conditions
    • Unit - (Triggering unit) Equal to *YourUnit*
  • Actions
    • *YourActions...*
 
Last edited:
  • revive
    • Events
    • Conditions
    • Actions
      • Set A = (Player number of (Owner of (Dying unit)))
      • Set ug = (Units owned by (Player(A)) matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) has buff Mirror Image) Equal to True)))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in ug) Not equal to 0
        • Then - Actions
          • Set p = (Position of (Dying unit))
          • Set unit = (Random unit from ug)
          • Set real = (Life of unit)
          • Hero - Instantly revive (Dying unit) at p, Hide revival graphics
          • Unit - Set life of (Dying unit) to R
          • Special Effect - Create a special effect at p using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation (udg_p)
          • Set p = (Position of unit)
          • Special Effect - Create a special effect at p using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation (udg_p)
          • Unit - Kill unit
          • Custom script: call DestroyGroup(udg_ug)
          • Skip remaining actions
        • Else - Actions
          • Custom script: call DestroyGroup(udg_ug)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player number of (Owner of (Dying unit))) Less than or equal to 5
        • Then - Actions
          • Set p = (Center of Region 016 <gen>)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player number of (Owner of (Dying unit))) Less than or equal to 10
            • Then - Actions
              • Set p = (Center of Region 017 <gen>)
            • Else - Actions
              • Skip remaining actions
      • Hero - Instantly revive (Dying unit) at p, Show revival graphics
      • Unit - Set mana of (Dying unit) to 100.00%
      • Unit - Set life of (Dying unit) to 100.00%
      • Camera - Pan camera for (Player(A)) to p over 0.00 seconds
      • Custom script: call RemoveLocation(udg_p)
      • Sound - Play ClanInvitation <gen>
      • Game - Display to (Player group((Player(A)))) the text: Your death made you...
      • Sound - Play InGameChatWhat1 <gen>
      • Player - Add -200 to (Player(A)) Current gold
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Killing unit) Not equal to No unit
          • (Killing unit) Not equal to (Dying unit)
        • Then - Actions
          • Player - Add 200 to (Owner of (Killing unit)) Current gold
        • Else - Actions
          • Do nothing
This way the trigger will occure , but I still need to make a trigger that start on game start and deny heroes exp gain , then making trigger that gives exp to non-mirror image heroes devided by their number when they kill. Someone knows how?
 
Level 15
Joined
Oct 18, 2008
Messages
1,591
@defskull:I try to be one, but with the exception of GUI triggering and ideas, I can't help much-I would be able to model some buildings as I learned to use 3ds Max, but I can't understand how to make WC3 animations, or how to set the names of the animation parts :(

@best:you don't have an event or condition... copy the one defskull told you into it :p Oh and I hope you know it's not MUI ^^

(Killing unit) Not equal to (Dying unit) -> Wait... WHAT?

Oh, and out the entire second section into the else part as it happens only if the unit doesn't have a mirror image
 
Yes! Yes yes yes yes! It works! I don't know why it made the crush earlier but it looks perfect!!!!!!
  • revive
    • Events
    • Conditions
    • Actions
      • Set A = (Player number of (Owner of (Dying unit)))
      • Set ug = (Units owned by (Player(A)) matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) has buff Mirror Image) Equal to True)))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in ug) Not equal to 0
        • Then - Actions
          • Set p = (Position of (Dying unit))
          • Set unit = (Random unit from ug)
          • Set real = (Life of unit)
          • Hero - Instantly revive (Dying unit) at p, Hide revival graphics
          • Unit - Set life of (Dying unit) to (R + 5.00)
          • Special Effect - Create a special effect at p using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation (udg_p)
          • Set p = (Position of unit)
          • Special Effect - Create a special effect at p using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation (udg_p)
          • Unit - Kill unit
          • Custom script: call DestroyGroup(udg_ug)
          • Skip remaining actions
        • Else - Actions
          • Custom script: call DestroyGroup(udg_ug)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player number of (Owner of (Dying unit))) Less than or equal to 5
        • Then - Actions
          • Set p = (Center of Region 016 <gen>)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player number of (Owner of (Dying unit))) Less than or equal to 10
            • Then - Actions
              • Set p = (Center of Region 017 <gen>)
            • Else - Actions
              • Skip remaining actions
      • Hero - Instantly revive (Dying unit) at p, Show revival graphics
      • Unit - Set mana of (Dying unit) to 100.00%
      • Unit - Set life of (Dying unit) to 100.00%
      • Camera - Pan camera for (Player(A)) to p over 0.00 seconds
      • Custom script: call RemoveLocation(udg_p)
      • Sound - Play ClanInvitation <gen>
      • Game - Display to (Player group((Player(A)))) the text: Your death made you...
      • Sound - Play InGameChatWhat1 <gen>
      • Player - Add -200 to (Player(A)) Current gold
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Killing unit) Not equal to No unit
          • (Killing unit) Not equal to (Dying unit)
        • Then - Actions
          • Player - Add 200 to (Owner of (Killing unit)) Current gold
        • Else - Actions
          • Do nothing
BEST TRIGGER EVER MADE!
 
Well , something like blizard hero - controll - exp - system. But made by me , and the heroes exp should be denied. I try make one now , I will post soon the result.
LOL if u wonder why it crushed , I used "R" instead of "REAL" and "r" wasnt initiated
  • unit exp
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to False
      • ((Killing unit) belongs to an enemy of (Owner of (Dying unit))) Equal to True
      • (Killing unit) Not equal to No unit
    • Actions
      • Set p = (Position of (Dying unit))
      • Set ug = (Units within 512.00 of p matching ((((Matching unit) is A Hero) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) is an illusion) Equal to False))))
      • Custom script: call RemoveLocation(udg_p)
      • Set Integer = (Number of units in ug)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Integer Equal to 0
        • Then - Actions
          • Do nothing
        • Else - Actions
          • Set MAX = (Level of (Dying unit))
          • Set MAX = (MAX x 50)
          • Set MAX = (MAX / Integer)
          • Unit Group - Pick every unit in ug and do (Actions)
            • Loop - Actions
              • Hero - Add Integer experience to (Picked unit), Show level-up graphics
      • Custom script: call DestroyGroup(udg_ug)
and there on-start trigger that disable gain exp
 

Attachments

  • hard spells nice view map.w3x
    108.5 KB · Views: 70
Level 15
Joined
Oct 18, 2008
Messages
1,591
after that there is what I wrote:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Killing unit) Not equal to No unit
      • (Killing unit) Not equal to (Dying unit) <<<<<<WTF IS THAT?
    • Then - Actions
      • Player - Add 200 to (Owner of (Killing unit)) Current gold
    • Else - Actions
      • Do nothing
 
Replace Dying unit with Triggering unit.
remove Do nothing. And you count MAX vairable and actually do not use it.

  • unit exp
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to False
      • ((Killing unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True
      • (Killing unit) Not equal to No unit
    • Actions
      • Set p = (Position of (Triggering unit))
      • Set ug = (Units within 512.00 of p matching ((((Matching unit) is A Hero) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is an illusion) Equal to False) and (((Matching) belongs to an ally of (Owner of (Killing unit))) Equal to True)
      • Custom script: call RemoveLocation(udg_p)
      • Set Integer = (Number of units in ug)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Integer Not equal to 0
        • Then - Actions
          • Set MAX = ((Level of (Triggering unit) x 50) / Integer)
          • Unit Group - Pick every unit in ug and do (Actions)
            • Loop - Actions
              • Hero - Add MAX experience to (Picked unit), Show level-up graphics
      • Custom script: call DestroyGroup(udg_ug)
 
Last edited:
  • unit exp
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to False
      • ((Killing unit) belongs to an enemy of (Owner of (Dying unit))) Equal to True
      • (Killing unit) Not equal to No unit
    • Actions
      • Set p = (Position of (Dying unit))
      • Set ug = (Units within 512.00 of p matching ((((Matching unit) is A Hero) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is an illusion) Equal to False) and (((Triggering unit) belongs to an ally of (Owner of (Killing unit))) Equ
      • Custom script: call RemoveLocation(udg_p)
      • Set Integer = (Number of units in ug)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Integer Equal to 0
        • Then - Actions
          • Do nothing
        • Else - Actions
          • Set MAX = (Level of (Dying unit))
          • Set MAX = (MAX x 50)
          • Set MAX = (MAX / Integer)
          • Unit Group - Pick every unit in ug and do (Actions)
            • Loop - Actions
              • Hero - Add MAX experience to (Picked unit), Show level-up graphics
      • Custom script: call DestroyGroup(udg_ug)
NOTE: There is still one problam: it will give netural units death to any hero nearby- both the killer team and random team arround. how to fix?
 
Last edited:
Status
Not open for further replies.
Top