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

[Spell] Could use help with a spell i'm creating

Status
Not open for further replies.
Level 7
Joined
Aug 11, 2010
Messages
270
The spell's name is Intervene; this is it's effect -- taken straight from the level description from my map. (Although I edited it for the workshop's formatting):

The Iron Juggernauts aids the targeted allied unit, intervening any enemy attack against them for a duration. Intevened enemies must attack the Iron Juggernaut instead.
Duration:
5/10/15/20/25
Cooldown:
30/25/20/15/10

  • HIJ Intervene Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Intervene (Iron Juggernaut)
    • Actions
      • Set HIJIntervene_MaxIndex = (HIJIntervene_MaxIndex + 1)
      • Set HIJIntervene_Caster[HIJIntervene_MaxIndex] = (Triggering unit)
      • Set HIJIntervene_CasterSpecific[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
      • Set HIJIntervene_Target[HIJIntervene_MaxIndex] = (Target unit of ability being cast)
      • Set HIJIntervene_AbilityLevel[HIJIntervene_MaxIndex] = (Level of Intervene (Iron Juggernaut) for (Triggering unit))
      • Set HIJIntervene_Counter[HIJIntervene_MaxIndex] = 0
      • -------- ----- --------
      • -------- Start trigger actions --------
      • -------- ----- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • HIJIntervene_Stacks[HIJIntervene_MaxIndex] Equal to 0
        • Then - Actions
          • Set HIJIntervene_Stacks[HIJIntervene_MaxIndex] = (HIJIntervene_Stacks[HIJIntervene_MaxIndex] + 1)
          • Unit Group - Add HIJIntervene_Target[HIJIntervene_MaxIndex] to HIJIntervene_Group[(Player number of (Owner of HIJIntervene_Caster[HIJIntervene_MaxIndex]))]
          • Unit - Add [SFX] Intervene Effect to HIJIntervene_Target[HIJIntervene_MaxIndex]
          • Floating Text - Create floating text that reads Intervene! above HIJIntervene_Target[HIJIntervene_MaxIndex] with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
          • Floating Text - Change the fading age of (Last created floating text) to 0.75 seconds
        • Else - Actions
          • Set HIJIntervene_Stacks[HIJIntervene_MaxIndex] = (HIJIntervene_Stacks[HIJIntervene_MaxIndex] + 1)
      • -------- ----- --------
      • -------- End trigger actions --------
      • -------- ----- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • HIJIntervene_MaxIndex Equal to 1
        • Then - Actions
          • Trigger - Turn on HIJ Intervene Loop <gen>
        • Else - Actions
  • HIJ Intervene Loop
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer HIJIntervene_CurrentIndex) from 1 to HIJIntervene_MaxIndex, do (Actions)
        • Loop - Actions
          • Set HIJIntervene_Counter[HIJIntervene_CurrentIndex] = (HIJIntervene_Counter[HIJIntervene_CurrentIndex] + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • HIJIntervene_Counter[HIJIntervene_CurrentIndex] Equal to (5 x HIJIntervene_AbilityLevel[HIJIntervene_CurrentIndex])
            • Then - Actions
              • -------- ----- --------
              • -------- Start trigger actions --------
              • -------- ----- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • HIJIntervene_Stacks[HIJIntervene_CurrentIndex] Equal to 0
                • Then - Actions
                  • Unit Group - Remove HIJIntervene_Target[HIJIntervene_CurrentIndex] from HIJIntervene_Group[(Player number of (Owner of HIJIntervene_Caster[HIJIntervene_CurrentIndex]))]
                  • Unit - Remove [SFX] Intervene Effect from HIJIntervene_Target[HIJIntervene_CurrentIndex]
                  • Floating Text - Create floating text that reads Intervene Expires! above HIJIntervene_Target[HIJIntervene_CurrentIndex] with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                  • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
                  • Floating Text - Change (Last created floating text): Disable permanence
                  • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
                  • Floating Text - Change the fading age of (Last created floating text) to 0.75 seconds
                • Else - Actions
                  • Set HIJIntervene_Stacks[HIJIntervene_CurrentIndex] = (HIJIntervene_Stacks[HIJIntervene_MaxIndex] - 1)
              • -------- ----- --------
              • -------- End trigger actions --------
              • -------- ----- --------
              • Set HIJIntervene_Caster[HIJIntervene_CurrentIndex] = HIJIntervene_Caster[HIJIntervene_MaxIndex]
              • Set HIJIntervene_Target[HIJIntervene_CurrentIndex] = HIJIntervene_Caster[HIJIntervene_MaxIndex]
              • Set HIJIntervene_AbilityLevel[HIJIntervene_CurrentIndex] = HIJIntervene_AbilityLevel[HIJIntervene_MaxIndex]
              • Set HIJIntervene_Counter[HIJIntervene_CurrentIndex] = HIJIntervene_Counter[HIJIntervene_MaxIndex]
              • Set HIJIntervene_Stacks[HIJIntervene_CurrentIndex] = HIJIntervene_Stacks[HIJIntervene_MaxIndex]
              • Set HIJIntervene_MaxIndex = (HIJIntervene_MaxIndex - 1)
              • Set HIJIntervene_CurrentIndex = (HIJIntervene_CurrentIndex - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • HIJIntervene_MaxIndex Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
The trigger works fine except for one particularly irritating problem. As you can see, HIJIntervene_Stacks is the variable that keeps the amount of instances on a single unit (So that it can be casted multiple times on a single unit without overwriting)
The instancing stacks don't even seem to work at all; which is a real bummer -- since if you cast Intervene on an ally three times with the max level of the ability before it's effect expires; you lose those casts. They don't reset the timer.
This is the first time I've really used Tank-Commander's 'MUI Spells Using Artificial Waits' tutorial; and so I'm still getting the hang of it. Any help would be absolutely appreciated!
 
Last edited:
Level 7
Joined
Aug 11, 2010
Messages
270
Unfortunately; no. That won't work since spirit link equally distributes damage, regardless of what it's percentage damage is sat to. Plus; they'd continue to attack the unit that was spirit linked.
Regardless though, I appreciate the suggestion and thank you for your kind words.
 
Level 12
Joined
May 20, 2009
Messages
822
Unfortunately; no. That won't work since spirit link equally distributes damage, regardless of what it's percentage damage is sat to. Plus; they'd continue to attack the unit that was spirit linked.
Regardless though, I appreciate the suggestion and thank you for your kind words.

Oh you want the unit to actually attack THAT unit?

Take any Object-Target spell of your choice, say...Curse. When you use the ability on the target, the trigger will order the targeted unit to attack the casting unit. Set the miss chance for Curse to 0.00 and remove the buff, because it's not even needed for this.

If you want it to be an AoE spell that has no target...Why not just use the Mountain Giant's Taunt?

(I still feel like I'm misunderstanding you, though. So try and explain it a bit better)
 
Level 7
Joined
Aug 11, 2010
Messages
270
Oh you want the unit to actually attack THAT unit?

Take any Object-Target spell of your choice, say...Curse. When you use the ability on the target, the trigger will order the targeted unit to attack the casting unit. Set the miss chance for Curse to 0.00 and remove the buff, because it's not even needed for this.

If you want it to be an AoE spell that has no target...Why not just use the Mountain Giant's Taunt?

(I still feel like I'm misunderstanding you, though. So try and explain it a bit better)

You're misunderstanding the effect.

Basically; what happens is Garth, the Iron Juggernaut uses Intervene on a target ally. For a short duration, any attacks made against the ally will immediately force the unit that attacked the unit with Intervene to attack the Iron Juggernaut. It's basically like a persistent taunt for one unit. Sort of like a reverse Misdirection, if you play World of Warcraft.

As stated, the taunt is persistent and lasts up to 30 seconds at max level (Starting at 5 seconds, at the first level). I'm not really asking how to get the spell working; the spell works fine. It's just that when the Iron Juggernaut uses Intervene on an ally who already had Intervene effecting them; after the duration of the first expires -- the entire effect is lost; instead of just keeping the effect refreshed.
 
Level 12
Joined
May 20, 2009
Messages
822
Is this spell going to be unique to the hero? That'll make it the easiest to think of how it should go. But for now, I think -

The spell leaves a buff on the target ally, and (If it is unique to the hero) then do

A unit is attacked
Attacking Unit* has buff (Your buff)
Issue order to attacking unit to attack Garth.

If it's not, then I don't know how to help you because I don't know how to pick up on specifically which unit put that buff on the target.

*Sorry, meant Attacking Unit, not Attacked Unit
 
Last edited:
Level 7
Joined
Aug 11, 2010
Messages
270
Is this spell going to be unique to the hero? That'll make it the easiest to think of how it should go. But for now, I think -

The spell leaves a buff on the target ally, and (If it is unique to the hero) then do

A unit is attacked
Unit attacked has buff (Your buff)
Issue order to attacking unit to attack Garth.

If it's not, then I don't know how to help you because I don't know how to pick up on specifically which unit put that buff on the target.

It is, but it needs to be MUI. As I stated before; the actual actions of the spell works fine. It's just the stack counter that isn't working.

Edit: Fixed a flaw in the loop system, updated the OP to reflect the change. The stack counter still doesn't work, though.
 
This is never used and is not needed.
  • HIJIntervene_CasterSpecific
Anything used twice or more should be stored in a variable and the variable should be used. Example: (Last created floating text)

Put this at the top of your HIJ Intervene Cast Trigger.

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • HIJIntervene_MaxIndex Equal to 0
    • Then - Actions
      • Trigger - Turn on HIJ Intervene Loop <gen>
    • Else - Actions
Also this is useless. The stacks variable is never set.
  • -------- Start trigger actions --------
  • -------- ----- --------
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • HIJIntervene_Stacks[HIJIntervene_MaxIndex] Equal to 0
  • Then - Actions
  • Set HIJIntervene_Stacks[HIJIntervene_MaxIndex] = (HIJIntervene_Stacks[HIJIntervene_MaxIndex] + 1)
  • Unit Group - Add HIJIntervene_Target[HIJIntervene_MaxIndex] to HIJIntervene_Group[(Player number of (Owner of HIJIntervene_Caster[HIJIntervene_MaxIndex]))]
  • Unit - Add [SFX] Intervene Effect to HIJIntervene_Target[HIJIntervene_MaxIndex]
  • Floating Text - Create floating text that reads Intervene! above HIJIntervene_Target[HIJIntervene_MaxIndex] with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
  • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
  • Floating Text - Change (Last created floating text): Disable permanence
  • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
  • Floating Text - Change the fading age of (Last created floating text) to 0.75 seconds
  • Else - Actions
  • Set HIJIntervene_Stacks[HIJIntervene_MaxIndex] = (HIJIntervene_Stacks[HIJIntervene_MaxIndex] + 1)
 
Level 7
Joined
Aug 11, 2010
Messages
270
This is never used and is not needed.
  • HIJIntervene_CasterSpecific
Anything used twice or more should be stored in a variable and the variable should be used. Example: (Last created floating text)

Put this at the top of your HIJ Intervene Cast Trigger.

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • HIJIntervene_MaxIndex Equal to 0
    • Then - Actions
      • Trigger - Turn on HIJ Intervene Loop <gen>
    • Else - Actions
Also this is useless. The stacks variable is never set.
  • -------- Start trigger actions --------
  • -------- ----- --------
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • HIJIntervene_Stacks[HIJIntervene_MaxIndex] Equal to 0
  • Then - Actions
  • Set HIJIntervene_Stacks[HIJIntervene_MaxIndex] = (HIJIntervene_Stacks[HIJIntervene_MaxIndex] + 1)
  • Unit Group - Add HIJIntervene_Target[HIJIntervene_MaxIndex] to HIJIntervene_Group[(Player number of (Owner of HIJIntervene_Caster[HIJIntervene_MaxIndex]))]
  • Unit - Add [SFX] Intervene Effect to HIJIntervene_Target[HIJIntervene_MaxIndex]
  • Floating Text - Create floating text that reads Intervene! above HIJIntervene_Target[HIJIntervene_MaxIndex] with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
  • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
  • Floating Text - Change (Last created floating text): Disable permanence
  • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
  • Floating Text - Change the fading age of (Last created floating text) to 0.75 seconds
  • Else - Actions
  • Set HIJIntervene_Stacks[HIJIntervene_MaxIndex] = (HIJIntervene_Stacks[HIJIntervene_MaxIndex] + 1)

Doesn't work. Also the first thing; is needed. It's just to another part of the spell that already works. (Albeit, is slightly inefficient)
  • HIJ Intervene Effect
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Owner of (Attacking unit)) is an enemy of (Owner of (Triggering unit))) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is in HIJIntervene_Group[1]) Equal to True
        • Then - Actions
          • Unit - Order (Attacking unit) to Attack HIJIntervene_CasterSpecific[1]
          • Floating Text - Create floating text that reads ! above (Attacking unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
          • Floating Text - Change the fading age of (Last created floating text) to 0.75 seconds
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is in HIJIntervene_Group[2]) Equal to True
        • Then - Actions
          • Unit - Order (Attacking unit) to Attack HIJIntervene_CasterSpecific[2]
          • Floating Text - Create floating text that reads ! above (Attacking unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
          • Floating Text - Change the fading age of (Last created floating text) to 0.75 seconds
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is in HIJIntervene_Group[3]) Equal to True
        • Then - Actions
          • Unit - Order (Attacking unit) to Attack HIJIntervene_CasterSpecific[3]
          • Floating Text - Create floating text that reads ! above (Attacking unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
          • Floating Text - Change the fading age of (Last created floating text) to 0.75 seconds
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is in HIJIntervene_Group[4]) Equal to True
        • Then - Actions
          • Unit - Order (Attacking unit) to Attack HIJIntervene_CasterSpecific[4]
          • Floating Text - Create floating text that reads ! above (Attacking unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
          • Floating Text - Change the fading age of (Last created floating text) to 0.75 seconds
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is in HIJIntervene_Group[5]) Equal to True
        • Then - Actions
          • Unit - Order (Attacking unit) to Attack HIJIntervene_CasterSpecific[5]
          • Floating Text - Create floating text that reads ! above (Attacking unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
          • Floating Text - Change the fading age of (Last created floating text) to 0.75 seconds
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is in HIJIntervene_Group[6]) Equal to True
        • Then - Actions
          • Unit - Order (Attacking unit) to Attack HIJIntervene_CasterSpecific[6]
          • Floating Text - Create floating text that reads ! above (Attacking unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
          • Floating Text - Change the fading age of (Last created floating text) to 0.75 seconds
        • Else - Actions
Also... I don't quite understand what you mean when you say the stack variable is never set. Could you perhaps explain what you mean?
The stack variables are what I'm trying to get working. They simply refuse to work. Basically; when the Iron Juggernaut (The Hero who's got the spell) attempts to cast ability on the same unit twice; instead of refreshing the duration -- it simply expires when the first duration expires; as opposed to refreshing.
 
Indexed array method always lets spell instances stack. So you do not need to try and make anything stack as it already does.

About your other trigger do this.
  • HIJ Intervene Effect
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Owner of (Attacking unit)) is an enemy of (Owner of (Triggering unit))) Equal to True
    • Actions
    • Foreach integer tempInt from 1 to 6 do actions
      • Loop
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • ((Triggering unit) is in HIJIntervene_Group[tempInt ]) Equal to True
          • Then - Actions
            • Unit - Order (Attacking unit) to Attack HIJIntervene_CasterSpecific[tempInt ]
            • Floating Text - Create floating text that reads ! above (Attacking unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
            • Set tempFloatingText = (Last created floating text)
            • Floating Text - Set the velocity of tempFloatingText to 64.00 towards 90.00 degrees
            • Floating Text - Change tempFloatingText : Disable permanence
            • Floating Text - Change the lifespan of tempFloatingText to 1.50 seconds
            • Floating Text - Change the fading age of tempFloatingText to 0.75 seconds
            • Custom script: set udg_tempFloatingText = null
          • Else - Actions
Also show me what you did. Don't just say doesn't work.
 
Level 7
Joined
Aug 11, 2010
Messages
270
Indexed array method always lets spell instances stack. So you do not need to try and make anything stack as it already does.

About your other trigger do this.
  • HIJ Intervene Effect
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Owner of (Attacking unit)) is an enemy of (Owner of (Triggering unit))) Equal to True
    • Actions
    • Foreach integer tempInt from 1 to 6 do actions
      • Loop
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • ((Triggering unit) is in HIJIntervene_Group[tempInt ]) Equal to True
          • Then - Actions
            • Unit - Order (Attacking unit) to Attack HIJIntervene_CasterSpecific[tempInt ]
            • Floating Text - Create floating text that reads ! above (Attacking unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
            • Set tempFloatingText = (Last created floating text)
            • Floating Text - Set the velocity of tempFloatingText to 64.00 towards 90.00 degrees
            • Floating Text - Change tempFloatingText : Disable permanence
            • Floating Text - Change the lifespan of tempFloatingText to 1.50 seconds
            • Floating Text - Change the fading age of tempFloatingText to 0.75 seconds
            • Custom script: set udg_tempFloatingText = null
          • Else - Actions
Also show me what you did. Don't just say doesn't work.

Oh, thanks! That's really efficient compared to what mine was. Also; yeah I realize it's 'supposed' to stack. But; maybe it's incompentence on my end; but when the timer is up -- it doesn't matter if there was an instance casted after the first cast or not; the spell's effect end.

+Rep for the efficient attack trigger.
 
Oh, thanks! That's really efficient compared to what mine was. Also; yeah I realize it's 'supposed' to stack. But; maybe it's incompentence on my end; but when the timer is up -- it doesn't matter if there was an instance casted after the first cast or not; the spell's effect end.

+Rep for the efficient attack trigger.

No problem. Also i believe it ends because you are indexing the groups as player numbers. That is making it MPI. You need MUI.
You also do not need the group.
Can you post your new triggers with the fixes I said above.
 
Level 7
Joined
Aug 11, 2010
Messages
270
No problem. Also i believe it ends because you are indexing the groups as player numbers. That is making it MPI. You need MUI.
You also do not need the group.
Can you post your new triggers with the fixes I said above.

  • HIJ Intervene Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Intervene (Iron Juggernaut)
    • Actions
      • Set HIJIntervene_MaxIndex = (HIJIntervene_MaxIndex + 1)
      • Set HIJIntervene_Caster[HIJIntervene_MaxIndex] = (Triggering unit)
      • Set HIJIntervene_CasterSpecific[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
      • Set HIJIntervene_Target[HIJIntervene_MaxIndex] = (Target unit of ability being cast)
      • Set HIJIntervene_AbilityLevel[HIJIntervene_MaxIndex] = (Level of Intervene (Iron Juggernaut) for (Triggering unit))
      • Set HIJIntervene_Counter[HIJIntervene_MaxIndex] = 0
      • -------- ----- --------
      • -------- Start trigger actions --------
      • -------- ----- --------
      • Unit Group - Add HIJIntervene_Target[HIJIntervene_MaxIndex] to HIJIntervene_Group[(Player number of (Owner of HIJIntervene_Caster[HIJIntervene_MaxIndex]))]
      • Unit - Add [SFX] Intervene Effect to HIJIntervene_Target[HIJIntervene_MaxIndex]
      • Floating Text - Create floating text that reads Intervene! above HIJIntervene_Target[HIJIntervene_MaxIndex] with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
      • Floating Text - Change the fading age of (Last created floating text) to 0.75 seconds
      • -------- ----- --------
      • -------- End trigger actions --------
      • -------- ----- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • HIJIntervene_MaxIndex Equal to 1
        • Then - Actions
          • Trigger - Turn on HIJ Intervene Loop <gen>
        • Else - Actions
  • HIJ Intervene Loop
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • HIJIntervene_MaxIndex Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
      • For each (Integer HIJIntervene_CurrentIndex) from 1 to HIJIntervene_MaxIndex, do (Actions)
        • Loop - Actions
          • Set HIJIntervene_Counter[HIJIntervene_CurrentIndex] = (HIJIntervene_Counter[HIJIntervene_CurrentIndex] + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • HIJIntervene_Counter[HIJIntervene_CurrentIndex] Equal to (5 x HIJIntervene_AbilityLevel[HIJIntervene_CurrentIndex])
            • Then - Actions
              • -------- ----- --------
              • -------- Start trigger actions --------
              • -------- ----- --------
              • Unit Group - Remove HIJIntervene_Target[HIJIntervene_CurrentIndex] from HIJIntervene_Group[(Player number of (Owner of HIJIntervene_Caster[HIJIntervene_CurrentIndex]))]
              • Unit - Remove [SFX] Intervene Effect from HIJIntervene_Target[HIJIntervene_CurrentIndex]
              • Floating Text - Create floating text that reads Intervene Expires! above HIJIntervene_Target[HIJIntervene_CurrentIndex] with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
              • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
              • Floating Text - Change the fading age of (Last created floating text) to 0.75 seconds
              • -------- ----- --------
              • -------- End trigger actions --------
              • -------- ----- --------
              • Set HIJIntervene_Caster[HIJIntervene_CurrentIndex] = HIJIntervene_Caster[HIJIntervene_MaxIndex]
              • Set HIJIntervene_Target[HIJIntervene_CurrentIndex] = HIJIntervene_Caster[HIJIntervene_MaxIndex]
              • Set HIJIntervene_AbilityLevel[HIJIntervene_CurrentIndex] = HIJIntervene_AbilityLevel[HIJIntervene_MaxIndex]
              • Set HIJIntervene_Counter[HIJIntervene_CurrentIndex] = HIJIntervene_Counter[HIJIntervene_MaxIndex]
              • Set HIJIntervene_MaxIndex = (HIJIntervene_MaxIndex - 1)
              • Set HIJIntervene_CurrentIndex = (HIJIntervene_CurrentIndex - 1)
            • Else - Actions
There. I hadn't got around to making the more efficient attack effect yet, although. I intend to shortly.

Here's what's happening though, if you know how to solve it you will be my Hero. Basically; when it applies the [SFX] Intervene ability (custom SFX for the spell, my map doesn't use buffs except for a very few select spells) and adds the person to the unit group; 30 seconds (Which is how long the spell lasts at max level) passes and the spell is immediately stopped; the unit is removed from the unit group, and the unit loses [SFX] Intervene ability. Even IF the Iron Juggernaut cast intervene on the same target 20 seconds after casting the first spell (which should reset the timer to 30 seconds).
 
When doing indexed array method with stacks you do not need the unit group.
For dummy units simply make another unit array.

Currently the problem is the unit group. It probably is not initialized in your variable editor. But you do not need it.

Remove these two lines.
  • Unit Group - Add HIJIntervene_Target[HIJIntervene_MaxIndex] to HIJIntervene_Group[(Player number of (Owner of HIJIntervene_Caster[HIJIntervene_MaxIndex]))]
  • Unit - Add [SFX] Intervene Effect to HIJIntervene_Target[HIJIntervene_MaxIndex]
And these two and it should work fine.
  • Unit Group - Remove HIJIntervene_Target[HIJIntervene_CurrentIndex] from HIJIntervene_Group[(Player number of (Owner of HIJIntervene_Caster[HIJIntervene_CurrentIndex]))]
  • Unit - Remove [SFX] Intervene Effect from HIJIntervene_Target[HIJIntervene_CurrentIndex]
Also your max index check is backwards.
In the trigger called HIJ Intervene Loop this should be in the then block after you de-index.
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • HIJIntervene_MaxIndex Equal to 0
  • Then - Actions
  • Trigger - Turn off (This trigger)
  • Else - Actions
 
Level 7
Joined
Aug 11, 2010
Messages
270
When doing indexed array method with stacks you do not need the unit group.
For dummy units simply make another unit array.

Currently the problem is the unit group. It probably is not initialized in your variable editor. But you do not need it.

Remove these two lines.
  • Unit Group - Add HIJIntervene_Target[HIJIntervene_MaxIndex] to HIJIntervene_Group[(Player number of (Owner of HIJIntervene_Caster[HIJIntervene_MaxIndex]))]
  • Unit - Add [SFX] Intervene Effect to HIJIntervene_Target[HIJIntervene_MaxIndex]
And these two and it should work fine.
  • Unit Group - Remove HIJIntervene_Target[HIJIntervene_CurrentIndex] from HIJIntervene_Group[(Player number of (Owner of HIJIntervene_Caster[HIJIntervene_CurrentIndex]))]
  • Unit - Remove [SFX] Intervene Effect from HIJIntervene_Target[HIJIntervene_CurrentIndex]
Also your max index check is backwards.
In the trigger called HIJ Intervene Loop this should be in the then block after you de-index.
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • HIJIntervene_MaxIndex Equal to 0
  • Then - Actions
  • Trigger - Turn off (This trigger)
  • Else - Actions

Sorry, I'm a little confused.
If I remove the add and remove abilities from the trigger (and the add and remove group unit) won't that mess up the ability? Since the special effect for the ability won't play; and the game won't know which units are effected by intervene...?
 
Sorry, I'm a little confused.
If I remove the add and remove abilities from the trigger (and the add and remove group unit) won't that mess up the ability? Since the special effect for the ability won't play; and the game won't know which units are effected by intervene...?

Sorry i copied two actions.
I meant remove these actions.

  • Unit Group - Add HIJIntervene_Target[HIJIntervene_MaxIndex] to HIJIntervene_Group[(Player number of (Owner of HIJIntervene_Caster[HIJIntervene_MaxIndex]))]
  • Unit Group - Remove HIJIntervene_Target[HIJIntervene_MaxIndex] to HIJIntervene_Group[(Player number of (Owner of HIJIntervene_Caster[HIJIntervene_MaxIndex]))]
The unit group is not needed so you do not need those actions.
 
Level 7
Joined
Aug 11, 2010
Messages
270
The trigger still doesn't work; it works even less now unfortunately... I think you might be misunderstanding what the ability does; there's no need for dummy units -- so I'm not quite sure why you mentioned them from before...

Here's the triggers

  • HIJ Intervene Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Intervene (Iron Juggernaut)
    • Actions
      • Set HIJIntervene_MaxIndex = (HIJIntervene_MaxIndex + 1)
      • Set HIJIntervene_Caster[HIJIntervene_MaxIndex] = (Triggering unit)
      • Set HIJIntervene_CasterSpecific[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
      • Set HIJIntervene_Target[HIJIntervene_MaxIndex] = (Target unit of ability being cast)
      • Set HIJIntervene_AbilityLevel[HIJIntervene_MaxIndex] = (Level of Intervene (Iron Juggernaut) for (Triggering unit))
      • Set HIJIntervene_Counter[HIJIntervene_MaxIndex] = 0
      • -------- ----- --------
      • -------- Start trigger actions --------
      • -------- ----- --------
      • Unit - Add [SFX] Intervene Effect to HIJIntervene_Target[HIJIntervene_MaxIndex]
      • Floating Text - Create floating text that reads Intervene! above HIJIntervene_Target[HIJIntervene_MaxIndex] with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
      • Floating Text - Change the fading age of (Last created floating text) to 0.75 seconds
      • -------- ----- --------
      • -------- End trigger actions --------
      • -------- ----- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • HIJIntervene_MaxIndex Equal to 1
        • Then - Actions
          • Trigger - Turn on HIJ Intervene Loop <gen>
        • Else - Actions
  • HIJ Intervene Loop
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer HIJIntervene_CurrentIndex) from 1 to HIJIntervene_MaxIndex, do (Actions)
        • Loop - Actions
          • Set HIJIntervene_Counter[HIJIntervene_CurrentIndex] = (HIJIntervene_Counter[HIJIntervene_CurrentIndex] + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • HIJIntervene_Counter[HIJIntervene_CurrentIndex] Equal to (5 x HIJIntervene_AbilityLevel[HIJIntervene_CurrentIndex])
            • Then - Actions
              • -------- ----- --------
              • -------- Start trigger actions --------
              • -------- ----- --------
              • Unit - Remove [SFX] Intervene Effect from HIJIntervene_Target[HIJIntervene_CurrentIndex]
              • Floating Text - Create floating text that reads Intervene Expires! above HIJIntervene_Target[HIJIntervene_CurrentIndex] with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
              • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
              • Floating Text - Change the fading age of (Last created floating text) to 0.75 seconds
              • -------- ----- --------
              • -------- End trigger actions --------
              • -------- ----- --------
              • Set HIJIntervene_Caster[HIJIntervene_CurrentIndex] = HIJIntervene_Caster[HIJIntervene_MaxIndex]
              • Set HIJIntervene_Target[HIJIntervene_CurrentIndex] = HIJIntervene_Caster[HIJIntervene_MaxIndex]
              • Set HIJIntervene_AbilityLevel[HIJIntervene_CurrentIndex] = HIJIntervene_AbilityLevel[HIJIntervene_MaxIndex]
              • Set HIJIntervene_Counter[HIJIntervene_CurrentIndex] = HIJIntervene_Counter[HIJIntervene_MaxIndex]
              • Set HIJIntervene_MaxIndex = (HIJIntervene_MaxIndex - 1)
              • Set HIJIntervene_CurrentIndex = (HIJIntervene_CurrentIndex - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • HIJIntervene_MaxIndex Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
Just to clarify the ability makes any units attacking a unit effected by the single-target 'buff' instead attack the Iron Juggernaut. Sort of like a single target taunt that lasts a duration; and makes the target unable to be attacked.
I'm not particularly good at explaining things, sorry.
 
Your loop trigger should be .03 seconds. Never use 1.00
To do a taunt spell is a little different.

You need to get unit orders around the unit. Check to see if those units' orders are attack / attack-move. Then you need to order those units to attack the Iron Juggernnaut.

To be simpler make it so that your unit can't be attacked. This will cause all units to attack Iron Juggarnaut on their own.

Currently from the triggers I don't see you adding the ability. So I guess you need the above method. Just in case though I'll explain another method.

If the buff handles the taunting then you need to add the buff to all units around the caster. You can do this by using a dummy unit. You need the dummy unit to cast ability that has the buff on it. The dummy will need to be ordered to cast the ability on each unit around the caster.

When explaining things if a unit has a buff I need to know that. I also need to know what the buff does.
 
Level 7
Joined
Aug 11, 2010
Messages
270
Your loop trigger should be .03 seconds. Never use 1.00
To do a taunt spell is a little different.

You need to get unit orders around the unit. Check to see if those units' orders are attack / attack-move. Then you need to order those units to attack the Iron Juggernnaut.

To be simpler make it so that your unit can't be attacked. This will cause all units to attack Iron Juggarnaut on their own.

Currently from the triggers I don't see you adding the ability. So I guess you need the above method. Just in case though I'll explain another method.

If the buff handles the taunting then you need to add the buff to all units around the caster. You can do this by using a dummy unit. You need the dummy unit to cast ability that has the buff on it. The dummy will need to be ordered to cast the ability on each unit around the caster.

When explaining things if a unit has a buff I need to know that. I also need to know what the buff does.

I see. And no; there's buff or dummy unit. There's nothing like that, in fact; a good majority of spells in this map don't use buffs. The unit-group was handling the taunting. Any unit that was attacked which was in HIJIntervene_Group will attack HIJIntervene_CasterSpecific; which is probably why the spell broke when I removed the group... So yeah; there's no buff placer. It's all through triggers.
 
I see. And no; there's buff or dummy unit. There's nothing like that, in fact; a good majority of spells in this map don't use buffs. The unit-group was handling the taunting. Any unit that was attacked which was in HIJIntervene_Group will attack HIJIntervene_CasterSpecific; which is probably why the spell broke when I removed the group... So yeah; there's no buff placer. It's all through triggers.

That is why I asked you to show triggers.
I need to see all triggers the spell uses in order to find problem.
I'm guessing you had a trigger that looped through the unit group that you never showed ?
If so please show all triggers.
 
Level 7
Joined
Aug 11, 2010
Messages
270
There's only the three triggers that I showed you though, honest. I'll link them again in their current state.
Sorry if I'm upsetting you, I do genuinely appreciate the help, though. I'm just kind of new to this sort of MUI system.

  • HIJ Intervene Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Intervene (Iron Juggernaut)
    • Actions
      • Set HIJIntervene_MaxIndex = (HIJIntervene_MaxIndex + 1)
      • Set HIJIntervene_Caster[HIJIntervene_MaxIndex] = (Triggering unit)
      • Set HIJIntervene_CasterSpecific[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
      • Set HIJIntervene_Target[HIJIntervene_MaxIndex] = (Target unit of ability being cast)
      • Set HIJIntervene_AbilityLevel[HIJIntervene_MaxIndex] = (Level of Intervene (Iron Juggernaut) for (Triggering unit))
      • Set HIJIntervene_Counter[HIJIntervene_MaxIndex] = 0
      • -------- ----- --------
      • -------- Start trigger actions --------
      • -------- ----- --------
      • Unit - Add [SFX] Intervene Effect to HIJIntervene_Target[HIJIntervene_MaxIndex]
      • Floating Text - Create floating text that reads Intervene! above HIJIntervene_Target[HIJIntervene_MaxIndex] with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
      • Floating Text - Change the fading age of (Last created floating text) to 0.75 seconds
      • -------- ----- --------
      • -------- End trigger actions --------
      • -------- ----- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • HIJIntervene_MaxIndex Equal to 1
        • Then - Actions
          • Trigger - Turn on HIJ Intervene Loop <gen>
        • Else - Actions
  • HIJ Intervene Effect
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Owner of (Attacking unit)) is an enemy of (Owner of (Triggering unit))) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is in HIJIntervene_Group[1]) Equal to True
        • Then - Actions
          • Unit - Order (Attacking unit) to Attack HIJIntervene_CasterSpecific[1]
          • Floating Text - Create floating text that reads ! above (Attacking unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
          • Floating Text - Change the fading age of (Last created floating text) to 0.75 seconds
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is in HIJIntervene_Group[2]) Equal to True
        • Then - Actions
          • Unit - Order (Attacking unit) to Attack HIJIntervene_CasterSpecific[2]
          • Floating Text - Create floating text that reads ! above (Attacking unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
          • Floating Text - Change the fading age of (Last created floating text) to 0.75 seconds
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is in HIJIntervene_Group[3]) Equal to True
        • Then - Actions
          • Unit - Order (Attacking unit) to Attack HIJIntervene_CasterSpecific[3]
          • Floating Text - Create floating text that reads ! above (Attacking unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
          • Floating Text - Change the fading age of (Last created floating text) to 0.75 seconds
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is in HIJIntervene_Group[4]) Equal to True
        • Then - Actions
          • Unit - Order (Attacking unit) to Attack HIJIntervene_CasterSpecific[4]
          • Floating Text - Create floating text that reads ! above (Attacking unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
          • Floating Text - Change the fading age of (Last created floating text) to 0.75 seconds
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is in HIJIntervene_Group[5]) Equal to True
        • Then - Actions
          • Unit - Order (Attacking unit) to Attack HIJIntervene_CasterSpecific[5]
          • Floating Text - Create floating text that reads ! above (Attacking unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
          • Floating Text - Change the fading age of (Last created floating text) to 0.75 seconds
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is in HIJIntervene_Group[6]) Equal to True
        • Then - Actions
          • Unit - Order (Attacking unit) to Attack HIJIntervene_CasterSpecific[6]
          • Floating Text - Create floating text that reads ! above (Attacking unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
          • Floating Text - Change the fading age of (Last created floating text) to 0.75 seconds
        • Else - Actions
  • HIJ Intervene Loop
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer HIJIntervene_CurrentIndex) from 1 to HIJIntervene_MaxIndex, do (Actions)
        • Loop - Actions
          • Set HIJIntervene_Counter[HIJIntervene_CurrentIndex] = (HIJIntervene_Counter[HIJIntervene_CurrentIndex] + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • HIJIntervene_Counter[HIJIntervene_CurrentIndex] Equal to (5 x HIJIntervene_AbilityLevel[HIJIntervene_CurrentIndex])
            • Then - Actions
              • -------- ----- --------
              • -------- Start trigger actions --------
              • -------- ----- --------
              • Unit - Remove [SFX] Intervene Effect from HIJIntervene_Target[HIJIntervene_CurrentIndex]
              • Floating Text - Create floating text that reads Intervene Expires! above HIJIntervene_Target[HIJIntervene_CurrentIndex] with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
              • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
              • Floating Text - Change the fading age of (Last created floating text) to 0.75 seconds
              • -------- ----- --------
              • -------- End trigger actions --------
              • -------- ----- --------
              • Set HIJIntervene_Caster[HIJIntervene_CurrentIndex] = HIJIntervene_Caster[HIJIntervene_MaxIndex]
              • Set HIJIntervene_Target[HIJIntervene_CurrentIndex] = HIJIntervene_Caster[HIJIntervene_MaxIndex]
              • Set HIJIntervene_AbilityLevel[HIJIntervene_CurrentIndex] = HIJIntervene_AbilityLevel[HIJIntervene_MaxIndex]
              • Set HIJIntervene_Counter[HIJIntervene_CurrentIndex] = HIJIntervene_Counter[HIJIntervene_MaxIndex]
              • Set HIJIntervene_MaxIndex = (HIJIntervene_MaxIndex - 1)
              • Set HIJIntervene_CurrentIndex = (HIJIntervene_CurrentIndex - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • HIJIntervene_MaxIndex Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
 
There's only the three triggers that I showed you though, honest. I'll link them again in their current state.
Sorry if I'm upsetting you, I do genuinely appreciate the help, though. I'm just kind of new to this sort of MUI system.

No you are not it is fine.

As for the fixes. First place those add / remove unit to and from unit group back into there.
In the variable editor make sure you have the unit group variable set to 6.
 
Yeah, it's set to 6; which is the maximum amount of players in the game. I also added the unit and group back into the triggers.

I don't see a problem in the triggers. It is still shutting the spell off after one instance has completed right ?
Try to put some debug messages in the triggers to see if the triggers run all the way through.
 
Tested it; unfortunately -- while it still worked; it was still having the problem I had beforehand. The trigger won't refresh the duration.

Edit: Oops, sorry for the double post.

To increase duration you need to then check if unit is in group at beginning of spell cast. If it is increase duration. If it isn't in the unit group create a new instance.
The triggers below should work.
You need to change from indexed arrays to unit indexer for efficiency and speed. http://www.hiveworkshop.com/forums/spells-569/gui-unit-indexer-1-2-0-2-a-197329/

Change the unit group array you have into a single unit group.

  • HIJ Intervene Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Intervene (Iron Juggernaut)
    • Actions
      • If all conditions are true do actions
        • If - Conditions
          • Unit is in HIJIntervene_Group
        • Then - Actions
          • -------- ----- --------
          • -------- Increase Duration --------
          • -------- ----- --------
          • Set HIJIntervene_MaxDuration[tempInt] = HIJIntervene_MaxDuration[tempInt] + (5 x (Level of Intervene (Iron Juggernaut) for tempUnit))
        • Else - Actions
          • -------- ----- --------
          • -------- Create new instance --------
          • -------- ----- --------
          • Set HIJIntervene_MaxIndex = (HIJIntervene_MaxIndex + 1)
          • Set tempUnit = (Triggering unit)
          • Set tempInteger = Custom value of tempUnit
          • Set HIJIntervene_Caster[tempInteger] = tempUnit
          • Set HIJIntervene_Target[tempInteger] = (Target unit of ability being cast)
          • Set HIJIntervene_Counter[tempInteger] = 0
          • Set HIJIntervene_MaxDuration[tempInt] = (5 x (Level of Intervene (Iron Juggernaut) for tempUnit))
          • -------- ----- --------
          • -------- Start trigger actions --------
          • -------- ----- --------
          • Unit Group - Add tempUnit to HIJIntervene_Group
          • Unit - Add [SFX] Intervene Effect to HIJIntervene_Target[tempInteger ]
          • Floating Text - Create floating text that reads Intervene! above HIJIntervene_Target[tempInteger ] with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Set tempFloatingText = (Last created floating text)
          • Floating Text - Set the velocity of tempFloatingText to 64.00 towards 90.00 degrees
          • Floating Text - Change tempFloatingText : Disable permanence
          • Floating Text - Change the lifespan of tempFloatingText to 1.50 seconds
          • Floating Text - Change the fading age of tempFloatingText to 0.75 seconds
          • -------- ----- --------
          • -------- End trigger actions --------
          • -------- ----- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • HIJIntervene_MaxIndex Equal to 1
            • Then - Actions
              • Trigger - Turn on HIJ Intervene Loop <gen>
            • Else - Actions
  • HIJ Intervene Loop
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • For each Unit in HIJIntervene_Group do actions
        • Loop - Actions
          • Set tempUnit = (Picked unit)
          • Set tempInt = Custom value of tempUnit
          • Set HIJIntervene_Counter[tempInt ] = (HIJIntervene_Counter[tempInt ] + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • HIJIntervene_Counter[tempInt] Equal to HIJIntervene_MaxDuration[tempInt]
            • Then - Actions
              • -------- ----- --------
              • -------- Start trigger actions --------
              • -------- ----- --------
              • Unit Group - Remove tempUnit from HIJIntervene_Group
              • Unit - Remove [SFX] Intervene Effect from HIJIntervene_Target[tempInt]
              • Floating Text - Create floating text that reads Intervene Expires! above HIJIntervene_Target[tempInt] with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
              • Set tempFloatingText = (Last created floating text)
              • Floating Text - Set the velocity of tempFloatingText to 64.00 towards 90.00 degrees
              • Floating Text - Change tempFloatingText: Disable permanence
              • Floating Text - Change the lifespan of tempFloatingText to 1.50 seconds
              • Floating Text - Change the fading age of tempFloatingText to 0.75 seconds
              • -------- ----- --------
              • -------- End trigger actions --------
              • -------- ----- --------
              • Set HIJIntervene_MaxIndex = (HIJIntervene_MaxIndex - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • HIJIntervene_MaxIndex Equal to 0
                • Then - Actions
                  • Trigger - Turn off HIJ Intervene Loop <gen>
                • Else - Actions
            • Else - Actions
For your unit is attacked trigger use the optimization I showed earlier. Since the unit group is no longer an array it will work the exact same.
 
Level 7
Joined
Aug 11, 2010
Messages
270
It is the unit group loop action.
  • Unit Group - Pick every unit in Group and do (Actions)
    • Loop - Actions

Oh... Derp; my bad.

Anyway, I tested it (without the attack event trigger); didn't work. Will it require the attack event trigger to actually function normally?

  • HIJ Intervene Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Intervene (Iron Juggernaut)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Target unit of ability being cast) is in HIJIntervene_Group) Equal to True
        • Then - Actions
          • Set HIJIntervene_MaxDuration[TempInteger] = (5 x (Level of Intervene (Iron Juggernaut) for TempUnit))
        • Else - Actions
          • Set HIJIntervene_MaxIndex = (HIJIntervene_MaxIndex + 1)
          • Set TempUnit = (Triggering unit)
          • Set TempInteger = (Custom value of TempUnit)
          • Set HIJIntervene_Caster[TempInteger] = TempUnit
          • Set HIJIntervene_Target[TempInteger] = (Target unit of ability being cast)
          • Set HIJIntervene_Counter[TempInteger] = 0
          • Set HIJIntervene_MaxDuration[TempInteger] = (5 x (Level of Intervene (Iron Juggernaut) for TempUnit))
          • -------- ----- --------
          • -------- Start Trigger Actions --------
          • -------- ----- --------
          • Unit Group - Add HIJIntervene_Target[TempInteger] to HIJIntervene_Group
          • Unit - Add [SFX] Intervene Effect to HIJIntervene_Target[TempInteger]
          • Floating Text - Create floating text that reads Intervene Activated! above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Set TempFloatingText = (Last created floating text)
          • Floating Text - Set the velocity of TempFloatingText to 64.00 towards 90.00 degrees
          • Floating Text - Change TempFloatingText: Disable permanence
          • Floating Text - Change the lifespan of TempFloatingText to 1.50 seconds
          • Floating Text - Change the fading age of TempFloatingText to 0.75 seconds
          • -------- ----- --------
          • -------- End Trigger Actions --------
          • -------- ----- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • HIJIntervene_MaxIndex Equal to 1
            • Then - Actions
              • Trigger - Turn on HIJ Intervene Loop <gen>
            • Else - Actions
  • HIJ Intervene Loop
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in HIJIntervene_Group and do (Actions)
        • Loop - Actions
          • Set TempUnit = (Picked unit)
          • Set TempInteger = (Custom value of TempUnit)
          • Set HIJIntervene_Counter[TempInteger] = (HIJIntervene_Counter[TempInteger] + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • HIJIntervene_Counter[TempInteger] Equal to HIJIntervene_MaxDuration[TempInteger]
            • Then - Actions
              • -------- ----- --------
              • -------- Start Trigger Actions --------
              • -------- ----- --------
              • Unit Group - Remove TempUnit from HIJIntervene_Group
              • Unit - Remove [SFX] Intervene Effect from (Triggering unit)
              • Floating Text - Create floating text that reads Intervene Expires! above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
              • Set TempFloatingText = (Last created floating text)
              • Floating Text - Set the velocity of TempFloatingText to 64.00 towards 90.00 degrees
              • Floating Text - Change TempFloatingText: Disable permanence
              • Floating Text - Change the lifespan of TempFloatingText to 1.50 seconds
              • Floating Text - Change the fading age of TempFloatingText to 0.75 seconds
              • -------- ----- --------
              • -------- End Trigger Actions --------
              • -------- ----- --------
              • Set HIJIntervene_MaxIndex = (HIJIntervene_MaxIndex - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • HIJIntervene_MaxIndex Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
 
Level 7
Joined
Aug 11, 2010
Messages
270
Yes it needs the attack trigger to function properly.

Kay, sorry. I'll add that to the spell. I didn't add it since I didn't figure i'd need it until the map finished...

But I just realized; I don't think it'll work now. There's no casterspecific variable anymore since it wasn't set in the new trigger. Should I re-add that or is that the improper way to do things?
 
Level 7
Joined
Aug 11, 2010
Messages
270
That variable was never needed.

Well yeah, but it's apart of your trigger.
  • HIJ Intervene Effect
  • Events
  • Unit - A unit Is attacked
  • Conditions
  • ((Owner of (Attacking unit)) is an enemy of (Owner of (Triggering unit))) Equal to True
  • Actions
  • Foreach integer tempInt from 1 to 6 do actions
  • Loop
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • ((Triggering unit) is in HIJIntervene_Group[tempInt ]) Equal to True
  • Then - Actions
  • Unit - Order (Attacking unit) to Attack HIJIntervene_CasterSpecific[tempInt ]
  • Floating Text - Create floating text that reads ! above (Attacking unit) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
  • Set tempFloatingText = (Last created floating text)
  • Floating Text - Set the velocity of tempFloatingText to 64.00 towards 90.00 degrees
  • Floating Text - Change tempFloatingText : Disable permanence
  • Floating Text - Change the lifespan of tempFloatingText to 1.50 seconds
  • Floating Text - Change the fading age of tempFloatingText to 0.75 seconds
  • Custom script: set udg_tempFloatingText = null
  • Else - Actions
Most notably the
  • Unit - Order (Attacking unit) to Attack HIJIntervene_CasterSpecific[tempInt ]
part. What do I do in it's place, exactly?
 
That trigger will also need to be updated.
Sorry I forgot to update it.

Edit: Will post new updated trigger soon.
Edit: Updated

  • HIJ Intervene Effect
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Owner of (Attacking unit)) is an enemy of (Owner of (Triggering unit))) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is in HIJIntervene_Group) Equal to True
        • Then - Actions
          • Set tempUnit = (Attacking unit)
          • Unit - Order tempUnit to Attack HIJIntervene_Caster[(Custom value of tempUnit)]
          • Floating Text - Create floating text that reads ! above tempUnit with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
          • Set tempFloatingText = (Last created floating text)
          • Floating Text - Set the velocity of tempFloatingText to 64.00 towards 90.00 degrees
          • Floating Text - Change tempFloatingText: Disable permanence
          • Floating Text - Change the lifespan of tempFloatingText to 1.50 seconds
          • Floating Text - Change the fading age of tempFloatingText to 0.75 seconds
        • Else - Actions
 
Level 7
Joined
Aug 11, 2010
Messages
270
That trigger will also need to be updated.
Sorry I forgot to update it.

Edit: Will post new updated trigger soon.
Edit: Updated

  • HIJ Intervene Effect
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Owner of (Attacking unit)) is an enemy of (Owner of (Triggering unit))) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is in HIJIntervene_Group) Equal to True
        • Then - Actions
          • Set tempUnit = (Attacking unit)
          • Unit - Order tempUnit to Attack HIJIntervene_Caster[(Custom value of tempUnit)]
          • Floating Text - Create floating text that reads ! above tempUnit with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
          • Set tempFloatingText = (Last created floating text)
          • Floating Text - Set the velocity of tempFloatingText to 64.00 towards 90.00 degrees
          • Floating Text - Change tempFloatingText: Disable permanence
          • Floating Text - Change the lifespan of tempFloatingText to 1.50 seconds
          • Floating Text - Change the fading age of tempFloatingText to 0.75 seconds
        • Else - Actions

No worries. Heh, I do appreciate the help!

Edit: Still doesn't seem to work strangely enough. I am still using the code from about 3 posts ago; and then I used the same exact code you posted here for me to use. They don't attack the Iron Juggernaut.
 
No worries. Heh, I do appreciate the help!

Edit: Still doesn't seem to work strangely enough. I am still using the code from about 3 posts ago; and then I used the same exact code you posted here for me to use. They don't attack the Iron Juggernaut.

The Iron Juggernaut is the caster right ?
It is currently set to attack caster. If you want it to attack a different unit then you have to order the units in the attacking trigger to attack the iron juggernauts.
 
Level 7
Joined
Aug 11, 2010
Messages
270
The Iron Juggernaut is the caster right ?
It is currently set to attack caster. If you want it to attack a different unit then you have to order the units in the attacking trigger to attack the iron juggernauts.

Yeah, Iron Juggernaut is the caster; so in theory, it should work. My thinking is that
  • Unit - Order tempUnit to Attack HIJIntervene_Caster[(Custom value of tempUnit)]
is the issue. It's using the custom value of tempUnit, which is the attacker. Correct me if i'm wrong; but shouldn't it use Iron Juggernaut's custom value, instead?
 
Level 7
Joined
Aug 11, 2010
Messages
270
Afraid it's still not working. Here's the complete code.

  • HIJ Intervene Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Intervene (Iron Juggernaut)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Target unit of ability being cast) is in HIJIntervene_Group) Equal to True
        • Then - Actions
          • Set HIJIntervene_MaxDuration[TempInteger] = (5 x (Level of Intervene (Iron Juggernaut) for TempUnit))
        • Else - Actions
          • Set HIJIntervene_MaxIndex = (HIJIntervene_MaxIndex + 1)
          • Set TempUnit = (Triggering unit)
          • Set TempInteger = (Custom value of TempUnit)
          • Set HIJIntervene_Caster[TempInteger] = TempUnit
          • Set HIJIntervene_Target[TempInteger] = (Target unit of ability being cast)
          • Set HIJIntervene_Counter[TempInteger] = 0
          • Set HIJIntervene_MaxDuration[TempInteger] = (5 x (Level of Intervene (Iron Juggernaut) for TempUnit))
          • -------- ----- --------
          • -------- Start Trigger Actions --------
          • -------- ----- --------
          • Unit Group - Add HIJIntervene_Target[TempInteger] to HIJIntervene_Group
          • Unit - Add [SFX] Intervene Effect to HIJIntervene_Target[TempInteger]
          • Floating Text - Create floating text that reads Intervene Activated! above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Set TempFloatingText = (Last created floating text)
          • Floating Text - Set the velocity of TempFloatingText to 64.00 towards 90.00 degrees
          • Floating Text - Change TempFloatingText: Disable permanence
          • Floating Text - Change the lifespan of TempFloatingText to 1.50 seconds
          • Floating Text - Change the fading age of TempFloatingText to 0.75 seconds
          • -------- ----- --------
          • -------- End Trigger Actions --------
          • -------- ----- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • HIJIntervene_MaxIndex Equal to 1
            • Then - Actions
              • Trigger - Turn on HIJ Intervene Loop <gen>
            • Else - Actions
  • HIJ Intervene Effect
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Owner of (Attacking unit)) is an enemy of (Owner of (Triggering unit))) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is in HIJIntervene_Group) Equal to True
        • Then - Actions
          • Set TempUnit = (Triggering unit)
          • Unit - Order TempUnit to Attack HIJIntervene_Caster[(Custom value of TempUnit)]
          • Floating Text - Create floating text that reads ! above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Set TempFloatingText = (Last created floating text)
          • Floating Text - Set the velocity of TempFloatingText to 64.00 towards 90.00 degrees
          • Floating Text - Change TempFloatingText: Disable permanence
          • Floating Text - Change the lifespan of TempFloatingText to 1.50 seconds
          • Floating Text - Change the fading age of TempFloatingText to 0.75 seconds
        • Else - Actions
  • HIJ Intervene Loop
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in HIJIntervene_Group and do (Actions)
        • Loop - Actions
          • Set TempUnit = (Picked unit)
          • Set TempInteger = (Custom value of TempUnit)
          • Set HIJIntervene_Counter[TempInteger] = (HIJIntervene_Counter[TempInteger] + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • HIJIntervene_Counter[TempInteger] Equal to HIJIntervene_MaxDuration[TempInteger]
            • Then - Actions
              • -------- ----- --------
              • -------- Start Trigger Actions --------
              • -------- ----- --------
              • Unit Group - Remove TempUnit from HIJIntervene_Group
              • Unit - Remove [SFX] Intervene Effect from (Triggering unit)
              • Floating Text - Create floating text that reads Intervene Expires! above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
              • Set TempFloatingText = (Last created floating text)
              • Floating Text - Set the velocity of TempFloatingText to 64.00 towards 90.00 degrees
              • Floating Text - Change TempFloatingText: Disable permanence
              • Floating Text - Change the lifespan of TempFloatingText to 1.50 seconds
              • Floating Text - Change the fading age of TempFloatingText to 0.75 seconds
              • -------- ----- --------
              • -------- End Trigger Actions --------
              • -------- ----- --------
              • Set HIJIntervene_MaxIndex = (HIJIntervene_MaxIndex - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • HIJIntervene_MaxIndex Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
The spell doesn't taunt and it doesn't expire now.
 
There is a big difference in the two then blocks of the casting trigger.

The one I made has this.
  • Set HIJIntervene_MaxDuration[tempInt] = HIJIntervene_MaxDuration[tempInt] + (5 x (Level of Intervene (Iron Juggernaut) for tempUnit))
Yours has this.
  • Set HIJIntervene_MaxDuration[TempInteger] = (5 x (Level of Intervene (Iron Juggernaut) for TempUnit))
When copying triggers make sure to copy them exactly.

If it is not fixed after that place some debug messages in there to see what is running and what isn't.
 
Level 7
Joined
Aug 11, 2010
Messages
270
Still no cigar. How do I do debug triggers? Just slap a 'game event - message' at the beginning of the trigger and each action?

Also that brings me to another slightly off-topic question. When I call my 'All Player' condition, it doesn't work. I have this feeling I might've accidentally purged the All Player variable. Though, it doesn't matter too much; I've made my own... Still, slightly irritating.
 
Still no cigar. How do I do debug triggers? Just slap a 'game event - message' at the beginning of the trigger and each action?

Yes. You then see what is displayed to tell you what is working and not working.

Also that brings me to another slightly off-topic question. When I call my 'All Player' condition, it doesn't work. I have this feeling I might've accidentally purged the All Player variable. Though, it doesn't matter too much; I've made my own... Still, slightly irritating.

I don't really understand that. If you have a new question start a new thread with the questions info so we can help.
 
Level 7
Joined
Aug 11, 2010
Messages
270
I don't really understand that. If you have a new question start a new thread with the questions info so we can help.

Kay, not really worth spamming the site about it. It's a very minor issue to me (I usually use variables to store playergroups, anyway.) just slightly irritating when making a quick testing trigger. Right now, I'm just trying to get Iron Juggernaut to work since he's the last Hero that I need before I can add the creep waves and release the first chapter of my map.


Okay so, I found two issues. The first issue: I made an action like this
  • Game - Display to ActivePlayerGroup the text: ((Name of (Attacking unit)) + ( is now attacking + (Name of HIJIntervene_Caster[(Custom value of TempUnit)])))
in my HIJ Intervene Effect trigger. In-game it comes out as: "*Insert unit name here* is attacking ". It doesn't know what to attack, apparently.

The second issue is the fact it's not expiring. The message never shows up.
 
Level 7
Joined
Aug 11, 2010
Messages
270
Here's the triggers I made, if you needed to see them
  • HIJ Intervene Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Intervene (Iron Juggernaut)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Target unit of ability being cast) is in HIJIntervene_Group) Equal to True
        • Then - Actions
          • Set HIJIntervene_MaxDuration[tempInt] = HIJIntervene_MaxDuration[tempInt] + (5 x (Level of Intervene (Iron Juggernaut) for tempUnit))
          • Game - Display to ActivePlayerGroup the text: Intervene has alrea...
        • Else - Actions
          • Set HIJIntervene_MaxIndex = (HIJIntervene_MaxIndex + 1)
          • Set TempUnit = (Triggering unit)
          • Set TempInteger = (Custom value of TempUnit)
          • Set HIJIntervene_Caster[TempInteger] = TempUnit
          • Set HIJIntervene_Target[TempInteger] = (Target unit of ability being cast)
          • Set HIJIntervene_Counter[TempInteger] = 0
          • Set HIJIntervene_MaxDuration[TempInteger] = (5 x (Level of Intervene (Iron Juggernaut) for TempUnit))
          • Game - Display to ActivePlayerGroup the text: Casting variables i...
          • -------- ----- --------
          • -------- Start Trigger Actions --------
          • -------- ----- --------
          • Unit Group - Add HIJIntervene_Target[TempInteger] to HIJIntervene_Group
          • Unit - Add [SFX] Intervene Effect to HIJIntervene_Target[TempInteger]
          • Floating Text - Create floating text that reads Intervene Activated... above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Set TempFloatingText = (Last created floating text)
          • Floating Text - Set the velocity of TempFloatingText to 64.00 towards 90.00 degrees
          • Floating Text - Change TempFloatingText: Disable permanence
          • Floating Text - Change the lifespan of TempFloatingText to 1.50 seconds
          • Floating Text - Change the fading age of TempFloatingText to 0.75 seconds
          • Game - Display to ActivePlayerGroup the text: Spell actions succe...
          • -------- ----- --------
          • -------- End Trigger Actions --------
          • -------- ----- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • HIJIntervene_MaxIndex Equal to 1
            • Then - Actions
              • Trigger - Turn on HIJ Intervene Loop <gen>
              • Game - Display to ActivePlayerGroup the text: Turning on HIJ Inte...
            • Else - Actions
  • HIJ Intervene Effect
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Owner of (Attacking unit)) is an enemy of (Owner of (Triggering unit))) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is in HIJIntervene_Group) Equal to True
        • Then - Actions
          • Set TempUnit = (Triggering unit)
          • Unit - Order TempUnit to Attack HIJIntervene_Caster[(Custom value of TempUnit)]
          • Floating Text - Create floating text that reads ! above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Set TempFloatingText = (Last created floating text)
          • Floating Text - Set the velocity of TempFloatingText to 64.00 towards 90.00 degrees
          • Floating Text - Change TempFloatingText: Disable permanence
          • Floating Text - Change the lifespan of TempFloatingText to 1.50 seconds
          • Floating Text - Change the fading age of TempFloatingText to 0.75 seconds
          • Game - Display to ActivePlayerGroup the text: ((Name of (Attacking unit)) + ( is now attacking + (Name of HIJIntervene_Caster[(Custom value of TempUnit)])))
        • Else - Actions
  • HIJ Intervene Loop
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in HIJIntervene_Group and do (Actions)
        • Loop - Actions
          • Set TempUnit = (Picked unit)
          • Set TempInteger = (Custom value of TempUnit)
          • Set HIJIntervene_Counter[TempInteger] = (HIJIntervene_Counter[TempInteger] + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • HIJIntervene_Counter[TempInteger] Equal to HIJIntervene_MaxDuration[TempInteger]
            • Then - Actions
              • -------- ----- --------
              • -------- Start Trigger Actions --------
              • -------- ----- --------
              • Unit Group - Remove TempUnit from HIJIntervene_Group
              • Unit - Remove [SFX] Intervene Effect from (Triggering unit)
              • Floating Text - Create floating text that reads Intervene Expires! above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
              • Set TempFloatingText = (Last created floating text)
              • Floating Text - Set the velocity of TempFloatingText to 64.00 towards 90.00 degrees
              • Floating Text - Change TempFloatingText: Disable permanence
              • Floating Text - Change the lifespan of TempFloatingText to 1.50 seconds
              • Floating Text - Change the fading age of TempFloatingText to 0.75 seconds
              • Game - Display to ActivePlayerGroup the text: Intervene's effect ...
              • -------- ----- --------
              • -------- End Trigger Actions --------
              • -------- ----- --------
              • Set HIJIntervene_MaxIndex = (HIJIntervene_MaxIndex - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • HIJIntervene_MaxIndex Equal to 0
                • Then - Actions
                  • Game - Display to ActivePlayerGroup the text: Looping trigger tur...
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
 
Status
Not open for further replies.
Top