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

Status
Not open for further replies.
Level 3
Joined
Mar 16, 2010
Messages
24
I am looking for a way to indicate where an AoE is for a casted spell (even for the enemy) so that it is possible to dodge the spell.

For example, say a grenade was thrown at a targeted area. Just as it was thrown, and before it hits the ground, the area that it was about to hit would light up or something as to warn enemies.

Does anyone know how to do this? Thank you.
 
Let's say that the Area of Effect is 250.00.
You can do a circle of effects, warning the units:
  • Trigger
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Set AoE = 250.00
      • Set Points[1] = (Target point of ability being cast)
      • For each (Integer A) from 1 to 20, do (Actions)
        • Loop - Actions
          • Set Points[2] = (Points[1] offset by AoE towards (18.00 x (Real((Integer A)))) degrees)
          • Special Effect - Create a special effect at Points[2] using Abilities\Spells\Other\Aneu\AneuTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation (udg_Points[2])
      • Custom script: call RemoveLocation (udg_Points[1])
If they are destroyed too fast for your aim, then you can copy paste the footman unit, change its model to the model of the "warning" event, set Art - Shadow to None and then create this trigger:
  • Trigger
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Set AoE = 250.00
      • Set Points[1] = (Target point of ability being cast)
      • For each (Integer A) from 1 to 20, do (Actions)
        • Loop - Actions
          • Set Points[2] = (Points[1] offset by AoE towards (18.00 x (Real((Integer A)))) degrees)
          • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Points[2] facing Default building facing degrees
          • Custom script: call UnitAddAbility (GetLastCreatedUnit(), 'Aloc')
          • Unit - Make (Last created unit) Invulnerable
          • Custom script: call UnitRemoveAbility (GetLastCreatedUnit(), 'Aatk')
          • Unit - Add a 4.00 second Generic expiration timer to (Last created unit)
          • Custom script: call RemoveLocation (udg_Points[2])
      • Custom script: call RemoveLocation (udg_Points[1])
Points[] is a Point variable (Array ticked) and AoE is a Real variable.
 
Status
Not open for further replies.
Top