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

Help making Locust Swarm damage to ba based on attribute

Status
Not open for further replies.
Level 7
Joined
Jul 7, 2008
Messages
332
O_O
I tried to make it something like this..but I am just bad at triggers so it didn't work

  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Summon Misha (Rexxar)
  • Actions
    • Set Caster = (Casting unit)
    • Set CasterPoint = (Position of Caster)
    • Unit - Create 20 Locust for (Owner of (Casting unit)) at CasterPoint facing (Random point in (Playable map area))
    • Set LocustGroup = (Last created unit group)
    • Unit Group - Order LocustGroup to Undead Crypt Lord - Locust Swarm
    • Unit Group - Pick every unit in LocustGroup and do (Unit - Cause (Picked unit) to damage (Attacked unit), dealing ((Real((Strength of Caster (Exclude bonuses)))) x 10.00) damage of attack type Spells and damage type Normal)
    • Wait 10.00 game-time seconds
    • Unit Group - Pick every unit in LocustGroup and do (Unit - Remove (Picked unit) from the game)
 
Or... You could make the damage constant, just let attribute set the amount of locust to spawn.
You could try this:
  • Locust Trigger
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Locust Swarm
    • Actions
      • For each (Integer A) from (Strength of (Triggering unit) (Exclude bonuses)) to (Strength of (Triggering unit) (Exclude bonuses)), do (Actions)
        • Loop - Actions
          • Unit - Create (Integer A) Dummy Unit for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
          • Unit Group - Add (Last created unit) to Locust_UnitGroup
      • Unit Group - Pick every unit in Locust_UnitGroup and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Undead Crypt Lord - Locust Swarm
Where "Locust_UnitGroup" is a variable of the type "Unit Group". Add a modified ability of Locust Swarm with maybe only one locust to the Dummy Unit, so that it may cast it. The Locust swarm ability that your hero is casting should be a dummy-ability (like "Roar (Night Elf)" with 0% damage increase).
There most likely are better ways to do this, thou...
 
Level 12
Joined
Apr 15, 2008
Messages
1,063
Very simple, just create dummy +damage ability with enough levels, and then add it to locusts (which have 1-1 damage)
  • Melee Initialization
    • Events
      • Unit - A unit enters (Entire map)
    • Conditions
      • (Unit-type of (Entering unit)) Equal to Locust
    • Actions
      • Game - Add (dummy ability) to (Entering unit)
      • Game - Set level of (dummy ability) for (Entering unit) to (attribute)
 
Status
Not open for further replies.
Top