• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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