• 🏆 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!

Approximate location

Status
Not open for further replies.
Level 4
Joined
Jun 15, 2009
Messages
37
Hello, I need help about a trigger that would do a circle of pings around a certain unit on the map to show it's approximate location when another unit uses a spell.

The thing is I don't know how to do that "ping circle", do I need to use multiple "point with offset" is is there a faster way ?
Thanks
 
Level 22
Joined
Feb 3, 2009
Messages
3,292
Here it is, edit it to your needs.

  • For each (Integer A) from 1 to 10, do (Actions)
    • Loop - Actions
      • Cinematic - Ping minimap for (All players) at ((Position of Priest 0000 <gen>) offset by 500.00 towards ((Real((Integer A))) x 36.00) degrees) for 5.00 seconds, using a Simple ping of color (100.00%, 100.00%, 100.00%)
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Edit: Bara was faster, but Bara has leaks :X
I dislike leaks.

  • Ping
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Animate Dead
    • Actions
      • Set Loc1 = (Position of Knight 0001 <gen>)
      • For each (Integer LoopInt) from 1 to 10, do (Actions)
        • Loop - Actions
          • Set Loc2 = (Loc1 offset by 300.00 towards ((Real(LoopInt)) x 36.00) degrees)
          • Cinematic - Ping minimap for (All players) at Loc2 for 1.00 seconds, using a Simple ping of color (100.00%, 100.00%, 100.00%)
          • Custom script: call RemoveLocation(udg_Loc2)
      • Custom script: call RemoveLocation(udg_Loc1)
Info:

3 Variables: Loc1 (point), Loc2 (point), LoopInt (integer).
The custom script is used to remove leaks (so the trigger doesn't cause any lag).
The "Point with polar offset" is a horrible function, but GUI doesn't have a lot of easy replacements for it.

What you can change:

"Loop from 1 to X" - you can set the X to anything you want (it's the amount of pings).
You MUST change te "LoopInt x 36" as well if you do that! I set it to 36 because 36*10 = 360 (a complete circle).
So if you set it from 1-8, then it must be LoopInt x 45.

"Offset by 300.", you can set the 300 to anything you like (distance of the pings).

And the time of the pings of course.
 
Status
Not open for further replies.
Top