[Spell] How to make a "Pursuit" spell?

Level 14
Joined
May 9, 2021
Messages
263
Basically I am trying to make a spell that:

- Marks a targeted enemy Hero for a duration. For the duration of the spell, units owned by the caster of the spell and their allies gain minorly increased movement speed in a small radius around the target and massively increased movement speed further away.

My original idea was to just base it off any single-target spell and trigger it to give the enemy Hero two serperate Endurance Auras that only affect enemy units, but I came to the conclusion that this would affect ALL units not just those owned by the caster of the spell...

This is only intended to be used by one Player if that matters.

If anyone can give me some help it'd be greatly appreciated.
 
Level 12
Joined
Nov 13, 2010
Messages
277
well then i think i have an ider for you
i based Speedminor and Speedmajor on item speed bonus
  • Event:
    • Unit - A unit Starts the effect of an ability
  • Conditions:
    • (Ability being cast) Equal to Pursuit
  • Actions:
    • Set PursuitTarget = (Target unit of ability being cast)
    • Set PursuitCaster = (Triggering unit)
    • Set PursuitCasterPlayer = (Owner of PursuitCaster)
    • Set PursuitDuration = 10.00
    • Start Timer PursuitTimer for 10.00 seconds
    • Turn On "Pursuit Loop"
  • Event:
    • Every 0.25 seconds of game time
  • Conditions:
    • PursuitTarget Not equal to No unit
  • Actions:
    • Unit Group - Pick all units in playable map area matching:
      • (Owner of (Matching unit)) is an ally of PursuitCasterPlayer AND
      • (Distance between (Matching unit) and PursuitTarget) < 2000 AND
      • (Unit-type is not structure)
    • Loop:
      • If distance < 400:
        • Unit - Add SpeedMinor from (Picked unit)
        • Unit - Remove SpeedMinor from (Picked unit)
      • Else if distance >= 400 and < 2000:
        • Unit - Add SpeedMajor from (Picked unit)
        • Unit - Remove SpeedMajor from (Picked unit)
      • Else:
        • Unit - Remove SpeedMinor from (Picked unit)
        • Unit - Remove SpeedMajor from (Picked unit)
  • Event:
    • Unit - A unit Dies
  • Conditions:
    • (Triggering unit) Equal to PursuitTarget
  • Actions:
    • Turn off Loop trigger
    • Set PursuitTarget = No unit
    • Unit Group - Pick every unit in PursuitAffectedUnits and do (Actions)
      • Loop - Actions:
        • Unit - Remove SpeedMinor from (Picked unit)
        • Unit - Remove SpeedMajor from (Picked unit)
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
My original idea was to just base it off any single-target spell and trigger it to give the enemy Hero two serperate Endurance Auras that only affect enemy units, but I came to the conclusion that this would affect ALL units not just those owned by the caster of the spell...
Spawn a dummy unit for the correct player, set the targets of the auras to only affect player units, and periodically move the dummy so its position matches the position of the targeted unit. Aura update frequency is quite low anyway, so you probably will not even notice a lagtime with a movement period of like 0.25.
 
Top