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

[General] Create pathing blockers in a circle

Status
Not open for further replies.
Can there be done a trigger that creates Pathing Blockers around the caster in range of 800? And 30 seconds later to destroy them?

  • Destructible - Create a Pathing Blocker (Both) at ((Position of Archmage 0001 <gen>) offset by 800.00 towards 0.00 degrees) facing (Random angle) with scale 1.00 and variation 0
I guess it'll be somethign like this. Then for remove maybe I'll put all of them in a group and on removal will remove all picked destructibles in group. But how do I make this spell?
 
Level 28
Joined
Sep 26, 2009
Messages
2,520
Well, you could use loop and a bit of math.

First, you need destructible variable array where you will save all those pathing blockers.
Next, you will need to find out the angle between 1 pathing blocker and another that is right next to it => this can be done easily by using grid (G key by default) in WE (yellow grid = 512 range, white = 128, gray = 32) and using real comparison - angle between points.

Once you have the angle you can use "For each integer" loop.
360° / the angle you got from the comparison earlier = how many pathing blockers you can put in the circle and this will be the max amount for the For each integer Loop.

In the loop you will use the line you have above, but instead of "towards 0.00 degrees" you will have "towards [current loop number * angle you got from comparsion] degrees" and save last created destructible in the array.

But tbh it may not end up as a complete circle, since pathing blockers can be placed only every 64 pixels, not less.


when you want to remove those pathing blockers, you just loop through them and destroy them that way.
 
Status
Not open for further replies.
Top