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

Circle of 13 units

Not open for further replies.
Level 3
Oct 1, 2018
Lets make it as short as possible...
I am currently trying to make an Orcish-Roulette.
In the end it should be for 12 players.
Therefore I want to have 13 units standing in a circle. The first one is the "bank"-unit, wich is the zero.

This is not about "how to make a roulette", i can handle the deeper stuff myself. The problem i have is to make a circle of those units.

For an example i tried the Frost-Nova special-effect animation trigger from the map ExtremeCandyWar2004. You can find that map ingame under:


When you select the Mage, wich is in Team 1 the Troll-Priest, you can choose the Frost-Nova spell as hero ability. This spell creates 13 special-effects, that doesnt show up in a real circle, as i notices by playing.

The trigger for the Spell uses following function to crate its special effects:
-For each integet A from 0-12 (1-13?)
-Create specialeffect at Pont with polar offset

The offset is 500, wich doesnt really matter for me. (Im just guessing at this point) The degrees used for this function are 28 x player[integer A]. (This is easy to understand for me)

The spell didnt create a real circle, it was near to it, but did not work for Blizzard eather.

So i put out my calculator and asked it, what is 360÷13?
It's answer was = 27,6923....
So i got 27,69. (Becouse real variables only allow 2 spaces behind the [ , ])

I have rebuild this function using Units instead of special-effects. I was unable to make a real circle. The units are flying, have an collision of -1 and in the trigger, just after they are createt, they'r collision is turned off.

So this seems to be more an mathematic problem. My math is pritty bad, specialy my geometry! ^^
Last edited:
Level 23
Jan 1, 2009
Your idea about the calculation is correct, maybe try posting your trigger next time so we can see exactly what's going on.
The collision and flying stuff you should just be able to remove.

  • Circle
    • Events
      • Time - Elapsed game time is 2.00 seconds
    • Conditions
    • Actions
      • Set center = (Center of (Playable map area))
      • For each (Integer A) from 0 to 12, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Footman for Player 1 (Red) at (center offset by 512.00 towards ((Real((Integer A))) x (360.00 / 13.00)) degrees) facing Default building facing degrees
Leaks included

Level 3
Oct 1, 2018
Sorry i forgot that part. I found out that one unit from player neutral-passiv does not spawn. I replaced this player with neutral-enemy.
Now it works.

I have also changed the degrees in the loop from 27.69 to 360/13 like you.

Why doesn't it work with neutral-passive?
13_Units Trigger.jpg

-create unit facing angle with unit facing point. (P_Center)

There was times i have failed the mathe test but my teachers never gave me an:

Last edited:
Why doesn't it work with neutral-passive?
Because you're using player numbers in your angle formula for the polar offset, so changing the player changes the point at which the unit is created.
To fix it, multiply the angle with integer A directly as in Frotty's example.

Also, you're looping from 0 to 13, but your player array does not contain a player at index 0. Change the loop start position to 1.
Not open for further replies.