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

AOE buff

Status
Not open for further replies.
Level 1
Joined
Mar 15, 2022
Messages
3
Hello there, fellows!

I'm trying to create a custom campaign and I already started with the heroes. Most were easily made through the object editor, but this one is a bit harder.

War-Cry
Gives friendly units a 25% damage bonus, 20% movement speed bonus, 40% attack speed bonus and +1 health regen in 70 range around the caster including him.

I realized that I can edit in-game spells (bloodlust, inner fire, rejuvenation) and put them into a trigger, but since I have little experience with them I don't know how to make one.

I will appreciate any help. Thy
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,877
Unfortunately you can't combine the effects of multiple abilities into one single ability, but you can cast multiple abilities at the same time using triggers.

Here's an example using Roar + Bloodlust:
  • War Cry Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to War Cry (Main)
    • Actions
      • -------- Define the Area of Effect: --------
      • Set VariableSet WarCry_AoE = 700.00
      • -------- --------
      • -------- Set some important Variables and add nearby units to a Unit Group: --------
      • Set VariableSet WarCry_Caster = (Triggering unit)
      • Set VariableSet WarCry_Player = (Triggering player)
      • Set VariableSet WarCry_Point = (Position of WarCry_Caster)
      • Set VariableSet WarCry_Group = (Units within (WarCry_AoE + 300.00) of WarCry_Point.)
      • -------- --------
      • -------- Setup the Dummy which will cast Bloodlust: --------
      • Unit - Create 1 Dummy (Uncle) for WarCry_Player at WarCry_Point facing Default building facing degrees
      • Set VariableSet WarCry_Dummy = (Last created unit)
      • Unit - Add War Cry (Dummy) to WarCry_Dummy
      • Unit - Add a 0.20 second Generic expiration timer to WarCry_Dummy
      • -------- --------
      • -------- Cast Bloodlust on valid units within 700 range of the caster: --------
      • Unit Group - Pick every unit in WarCry_Group and do (Actions)
        • Loop - Actions
          • Set VariableSet WarCry_Target = (Picked unit)
          • Custom script: if IsUnitInRange(udg_WarCry_Target, udg_WarCry_Caster, udg_WarCry_AoE) then
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (WarCry_Target is alive) Equal to True
              • (WarCry_Target belongs to an ally of WarCry_Player.) Equal to True
              • (WarCry_Target is A structure) Equal to False
            • Then - Actions
              • Unit - Order WarCry_Dummy to Orc Shaman - Bloodlust WarCry_Target
            • Else - Actions
          • Custom script: endif
      • -------- --------
      • -------- Clean up memory leaks: --------
      • Custom script: call RemoveLocation (udg_WarCry_Point)
      • Custom script: call DestroyGroup(udg_WarCry_Group)
War Cry (Main) is the Roar ability. War Cry (Dummy) is the Bloodlust ability. The main unit casts Roar which then creates a Dummy unit that casts Bloodlust on nearby allies. Dummys are unselectable units which we use to cast spells via triggers. You often have your Hero or whatever cast a "fake" spell and then using triggers you create a Dummy unit and order it to cast the real spell, often on multiple targets at once, this is how things like AoE Bloodlust are possible.

The IsUnitInRange() custom script is used to make sure that a unit's Collision Size is taken into consideration when checking if they're within range of the AoE. This is needed because Unit Groups don't take into consideration Collision Size when gathering nearby units, while on the other hand, Abilities do. This means that an ability will actually have a larger Area of Effect despite using the same radius value (700.00 in this case). That being said, some of my tests still had issues where a unit would receive the Roar buff but not the Bloodlust buff. I'm not too sure why though (probably chalk it up to Reforged)... Anyway, it works exactly as it should most of the time.

Attached a demo map below. Requires v1.32.
 

Attachments

  • War Cry 1.w3m
    18.3 KB · Views: 19
Last edited:
Status
Not open for further replies.
Top