• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

When I make a trigger skill. It can only using if there is one Unit using it at the same time?

Level 1
Joined
Feb 24, 2025
Messages
2
When I make a trigger skill. It can only using if there is one Unit using it at the same time?
I make the kind of Age of War map and want create a lot type of unit and skill that auto using, when it more than one that kind of unit then they are Stop doing thing. How can I fix this?
 
I'm not quite sure what you are asking. I’m guessing you want your triggered abilities to be MUI (Multi-Unit Instance-able). You will need to use variables and avoid things like waits.

This is an oversimplification, but you'll want to start with something like this:
your-spell-png.576220



I recommend reading some tutorials like this to get a better Idea. You can also check out Spells & Systems and download some approved GUI spells to check out their triggers. Though your probably better off learning jass or lua if you want your abilities to be fully MUI.
 
The root cause is that your spells are not MUI (= Multi-Unit Instanceable).
There are two important things to understand first:
  • Variables in WE's Trigger Editor are global variables. 'Global' means they are accessible from all your triggers
  • Variables can only hold a single value (in case of arrays, each index can hold only a single value; in case of hashtables each pair of key and childKey can hold a single value).

Consider following example where Bloodlust deals periodic damage to unit it was cast on:
  • Bloodlust Start
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Bloodlust
    • Actions
      • Set VariableSet BloodlustCaster = (Casting unit)
      • Set VariableSet BloodlustTarget = (Target unit of ability being cast)
      • Trigger - Turn on Bloodlust Periodic Damage <gen>
  • Bloodlust Periodic Damage
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (BloodlustTarget has buff Bloodlust) Equal to True
        • Then - Actions
          • Unit - Cause BloodlustCaster to damage BloodlustTarget, dealing 10.00 damage of attack type Spells and damage type Normal
        • Else - Actions
          • Trigger - Turn off (This trigger)
This will work fine when only a single unit has Bloodlust buff, but it will break when multiple units have the buff at the same time.
Let's say Bloodlust lasts for 12 seconds, a unit casts Bloodlust on Footman at time T and then on Grunt at time T+5s.
  • At time T the Footman unit will be assigned to variable BloodlustTarget
  • The periodic trigger will damage that Footman at times T+2s and T+4s
  • At time T+5s value in BloodlustTarget will be overwritten by Grunt.
  • The periodic trigger will damage Grunt at times T+6s, T+8s, ...
  • Periodic trigger only damages unit referenced by BloodlustTarget variable and as I wrote earlier, variables can hold only a single value. From time T+5s onwards there is nothing referencing the Footman anymore, so for last 7 seconds of the buff's duration Footman would not take any damage from the periodic trigger.

Making spell MUI will resolve your problem, but it makes trigger(s) more complex. See tutorials like https://www.hiveworkshop.com/threads/visualize-dynamic-indexing.241896/ or https://www.hiveworkshop.com/threads/mui-triggers-with-waits.218354/ which discuss the issue.
 
Back
Top