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!
Let's say i want an aura that only affects troll headhunters and grunts, but doesn't affect any other unit type near it. Is it possible to do that? if so, then i'd like to know how.
I think using triggers but It would be stupidly complicated, I think its better you go to the object editor and add to the grunts and trolls a rare unit classification (like acient or decoration) and make that aura only work for that unit class.
It's not that complicated. Here's a triggered Aura I made a little while ago that adds attack speed to nearby allied ranged units.
It can be adjusted to add any effect to any type of nearby units:
This adds the Heroes to the Celerity_SourceGroup (the unit group that contains the units that have the Aura ability) and turns on the Loop if needed.
Celerity Aura Learn
Events
Unit - A unit Learns a skill
Conditions
(Learned Hero Skill) Equal to Celerity Aura (Hero)
(Level of Celerity Aura (Hero) for (Triggering unit)) Equal to 1
Actions
Unit Group - Add (Triggering unit) to Celerity_SourceGroup
-------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Celerity Aura Loop <gen> is on) Equal to False
Then - Actions
Trigger - Turn on Celerity Aura Loop <gen>
Else - Actions
This is the periodic trigger that will search for nearby eligible targets for the aura. Targets are contained in the Celerity_TargetGroup.
Celerity Aura Loop
Events
Time - Every 0.50 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in Celerity_TargetGroup and do (Actions)
Loop - Actions
Set VariableSet Celerity_Target = (Picked unit)
Unit - Remove Celerity Aura (Attack Speed) from Celerity_Target
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Celerity_Target is in Celerity_SourceGroup.) Equal to False
Then - Actions
Special Effect - Destroy Celerity_Sfx[(Custom value of Celerity_Target)]
Else - Actions
-------- --------
Unit Group - Pick every unit in Celerity_SourceGroup and do (Actions)
Loop - Actions
Set VariableSet Celerity_Source = (Picked unit)
Set VariableSet Celerity_Level = (Level of Celerity Aura (Hero) for Celerity_Source)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Celerity_Source is alive) Equal to True
Celerity_Level Greater than 0
Then - Actions
Set VariableSet Celerity_Point = (Position of Celerity_Source)
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units within 900.00 of Celerity_Point.) and do (Actions)
Loop - Actions
Set VariableSet Celerity_Target = (Picked unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Celerity_Target is alive) Equal to True
(Celerity_Target belongs to an ally of (Owner of Celerity_Source).) Equal to True
(Celerity_Target is A structure) Equal to False
(Celerity_Target is Mechanical) Equal to False
(Celerity_Target is A melee attacker) Equal to False
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Celerity Aura (Attack Speed) for Celerity_Target) Equal to 0
Then - Actions
Unit - Add Celerity Aura (Attack Speed) to Celerity_Target
Unit - Set level of Celerity Aura (Attack Speed) for Celerity_Target to Celerity_Level
Unit Group - Add Celerity_Target to Celerity_TargetGroup
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Celerity_Target is in Celerity_SourceGroup.) Equal to False
Then - Actions
Special Effect - Create a special effect attached to the origin of Celerity_Target using Abilities\Spells\Other\GeneralAuraTarget\GeneralAuraTarget.mdl
Set VariableSet Celerity_Sfx[(Custom value of Celerity_Target)] = (Last created special effect)
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Celerity_Level Greater than (Level of Celerity Aura (Attack Speed) for Celerity_Target)
Then - Actions
Unit - Set level of Celerity Aura (Attack Speed) for Celerity_Target to Celerity_Level
Else - Actions
Unit - For Celerity_Target, Ability Celerity Aura (Attack Speed), Disable ability: True, Hide UI: False
Unit - For Celerity_Target, Ability Celerity Aura (Attack Speed), Disable ability: False, Hide UI: False
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.