• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] problem with a spell

Status
Not open for further replies.
Level 19
Joined
Feb 15, 2008
Messages
2,184
  • PassiveMirrorImage Copy Copy Copy
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Passive MI for (Triggering unit)) Greater than 0
    • Actions
      • Set TempGroup = (Units owned by (Owner of (Triggering unit)) matching ((((Matching unit) is an illusion) Equal to True) and ((Level of Passive MI for (Matching unit)) Greater than 0)))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in TempGroup) Less than 5
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Triggering unit) is an illusion) Equal to False
            • Then - Actions
              • Set Chance = ((Level of Passive MI for (Triggering unit)) x 10)
            • Else - Actions
              • Set Chance = ((Level of Passive MI for (Triggering unit)) x 6)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Chance Greater than or equal to (Random integer number between 1 and 100)
            • Then - Actions
              • Set TempLoc00 = (Position of (Triggering unit))
              • Unit - Create 1 Dummy PASSIVE for (Owner of (Triggering unit)) at TempLoc00 facing 0.00 degrees
              • Unit - Add Inventory (Hero) to (Last created unit)
              • Hero - Create Item Passive MI and give it to (Last created unit)
              • Hero - Order (Last created unit) to use (Last created item) on (Triggering unit)
              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
              • Custom script: call RemoveLocation(udg_TempLoc00)
            • Else - Actions
        • Else - Actions
      • Custom script: call DestroyGroup(udg_TempGroup)
the trigger asint working i wonder why
 
Last edited:
Level 8
Joined
Sep 13, 2006
Messages
431
  • Set TempGroup = (Units owned by (Owner of (Triggering unit)) matching ((((Matching unit) is an illusion) Equal to True) and ((Level of Passive MI for (Matching unit)) Greater than 0)))

I'm thinking it's probably something to do with this line. Can the illusions even register as having Passive MI? I was under the impression that illusions lost the abilities of the base unit. Maybe I'm wrong, b/c I haven't dealt with this stuff in a long time, but you might want to try checking that out...
 
Status
Not open for further replies.
Top