units circling a unit problem

mastah_

New Member
Reaction score
5
i have this skill that should do this
U= Unit that are spawned and should circle
H= hero who casts the spell

U
U U
U H U
U U
U
roughly like that so in a circle with 8 units the do a clockwise circle around the hero... ok that worrks except they end up circling closer and closer until they get under the hero and are together which is not how i want it... any help with this would be great

Triggers:
Code:
Ultimate 2
    Events
        Time - Every 0.08 seconds of game time
    Conditions
    Actions
        Unit - Order UltimateUnit[1] to Move To ((Position of UltimateUnit[2]) offset by 50.00 towards 0.00 degrees)
        Unit - Order UltimateUnit[2] to Move To ((Position of UltimateUnit[3]) offset by 50.00 towards 0.00 degrees)
        Unit - Order UltimateUnit[3] to Move To ((Position of UltimateUnit[4]) offset by 50.00 towards 0.00 degrees)
        Unit - Order UltimateUnit[4] to Move To ((Position of UltimateUnit[5]) offset by 50.00 towards 0.00 degrees)
        Unit - Order UltimateUnit[5] to Move To ((Position of UltimateUnit[6]) offset by 50.00 towards 0.00 degrees)
        Unit - Order UltimateUnit[6] to Move To ((Position of UltimateUnit[7]) offset by 50.00 towards 0.00 degrees)
        Unit - Order UltimateUnit[7] to Move To ((Position of UltimateUnit[8]) offset by 50.00 towards 0.00 degrees)
        Unit - Order UltimateUnit[8] to Move To ((Position of UltimateUnit[1]) offset by 50.00 towards 0.00 degrees)
 

Cidzero

Imma firin mah lazer!!!1!1
Reaction score
39
Because the positions of the ones on the left are moving towards the hero, if you only want them to move around, don't change the position. If you want them to expand outwards, you have to change one side to go left, one to go up, one to go down, one to go right...

Degrees:
*Edit* lol i got my left and right mixed up...
0 = right
90 = up
180 = left
270 = down
360+ = repeat

and all other degrees not multiples of 90 are inbetween those, so 45 = up-right. etc.
 

mastah_

New Member
Reaction score
5
Because the positions of the ones on the left are moving towards the hero, if you only want them to move around, don't change the position. If you want them to expand outwards, you have to change one side to go left, one to go up, one to go down, one to go right...

Degrees:

0 = left
90 = up
180 = right
270 = down
360+ = repeat

and all other degrees not multiples of 90 are inbetween those, so 45 = up-left. etc.

what do u mean "Don't change position" i have to or else they don't move unless i'm misunderstanding you...

btw since it screwed up the thing above its liek this :

------U
----U---U
---U--H--U
----U---U
------U
 

Kazuga

Let the game begin...
Reaction score
110
Just one small edit, 0 degrees is right (east) and 180 is left (west).

Edit: Look at these triggers, it's the wispwheel I'm using in my hero arena.
Code:
Fire protection
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Fire protection 
    Actions
        Set Wwcaster = (Triggering unit)
        Special Effect - Create a special effect at ((Position of Wwcaster) offset by 300.00 towards 90.00 degrees) using Units\Demon\Infernal\InfernalBirth.mdl
        Special Effect - Create a special effect at ((Position of Wwcaster) offset by 300.00 towards 180.00 degrees) using Units\Demon\Infernal\InfernalBirth.mdl
        Special Effect - Create a special effect at ((Position of Wwcaster) offset by 300.00 towards 270.00 degrees) using Units\Demon\Infernal\InfernalBirth.mdl
        Special Effect - Create a special effect at ((Position of Wwcaster) offset by 300.00 towards 360.00 degrees) using Units\Demon\Infernal\InfernalBirth.mdl
        Wait 1.00 game-time seconds
        -------- 1 --------
        Unit - Create 1 Fire protection dummy for (Owner of Wwcaster) at ((Position of Wwcaster) offset by 300.00 towards 90.00 degrees) facing (Position of Wwcaster)
        Set Wwdummy = (Last created unit)
        Unit - Set level of Permanent Immolation (Neutral Hostile 1) for Wwdummy to 1
        Unit - Turn collision for Wwdummy Off
        -------- 2 --------
        Unit - Create 1 Fire protection dummy2 for (Owner of Wwcaster) at ((Position of Wwcaster) offset by 300.00 towards 180.00 degrees) facing (Position of Wwcaster)
        Set Wwdummy2 = (Last created unit)
        Unit - Set level of Permanent Immolation (Neutral Hostile 1) for Wwdummy to 1
        Unit - Turn collision for Wwdummy2 Off
        -------- 3 --------
        Unit - Create 1 Fire protection dummy3 for (Owner of Wwcaster) at ((Position of Wwcaster) offset by 300.00 towards 360.00 degrees) facing (Position of Wwcaster)
        Set Wwdumy3 = (Last created unit)
        Unit - Set level of Permanent Immolation (Neutral Hostile 1) for Wwdummy to 1
        Unit - Turn collision for Wwdumy3 Off
        -------- 4 --------
        Unit - Create 1 Fire protection dummy4 for (Owner of Wwcaster) at ((Position of Wwcaster) offset by 300.00 towards 270.00 degrees) facing (Position of Wwcaster)
        Set Wwdummy4 = (Last created unit)
        Unit - Set level of Permanent Immolation (Neutral Hostile 1) for Wwdummy to 1
        Unit - Turn collision for Wwdummy4 Off
        Trigger - Turn on Rotate <gen>
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Fire protection  for Wwcaster) Equal to 1
            Then - Actions
                Wait 10.00 game-time seconds
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Fire protection  for Wwcaster) Equal to 2
            Then - Actions
                Wait 15.00 game-time seconds
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Fire protection  for Wwcaster) Equal to 3
            Then - Actions
                Wait 20.00 game-time seconds
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Fire protection  for Wwcaster) Equal to 4
            Then - Actions
                Wait 25.00 game-time seconds
            Else - Actions
        Unit - Kill Wwdummy
        Unit - Kill Wwdummy2
        Unit - Kill Wwdumy3
        Unit - Kill Wwdummy4
        Trigger - Turn off Rotate <gen>
Code:
Rotate
    Events
        Time - Every 0.01 seconds of game time
    Conditions
    Actions
        -------- 1 --------
        Set angle = (Angle from (Position of Wwcaster) to (Position of Wwdummy))
        Set angle = (angle + 2.00)
        Set CenterLoc = (Position of Wwcaster)
        Set MovetoPoint = (CenterLoc offset by (((Cos(angle)) x 300.00), ((Sin(angle)) x 300.00)))
        Unit - Move Wwdummy instantly to MovetoPoint, facing CenterLoc
        -------- 2 --------
        Set angle = (Angle from (Position of Wwcaster) to (Position of Wwdummy2))
        Set angle = (angle + 2.00)
        Set CenterLoc = (Position of Wwcaster)
        Set MovetoPoint = (CenterLoc offset by (((Cos(angle)) x 300.00), ((Sin(angle)) x 300.00)))
        Unit - Move Wwdummy2 instantly to MovetoPoint, facing CenterLoc
        -------- 3 --------
        Set angle = (Angle from (Position of Wwcaster) to (Position of Wwdumy3))
        Set angle = (angle + 2.00)
        Set CenterLoc = (Position of Wwcaster)
        Set MovetoPoint = (CenterLoc offset by (((Cos(angle)) x 300.00), ((Sin(angle)) x 300.00)))
        Unit - Move Wwdumy3 instantly to MovetoPoint, facing CenterLoc
        -------- 4 --------
        Set angle = (Angle from (Position of Wwcaster) to (Position of Wwdummy4))
        Set angle = (angle + 2.00)
        Set CenterLoc = (Position of Wwcaster)
        Set MovetoPoint = (CenterLoc offset by (((Cos(angle)) x 300.00), ((Sin(angle)) x 300.00)))
        Unit - Move Wwdummy4 instantly to MovetoPoint, facing CenterLoc
        Custom script:   call RemoveLocation(udg_CenterLoc)
        Custom script:   call RemoveLocation(udg_MovetoPoint)
Hm darn just saw they leak alot, I will need to fix that for my own later but anyhow that's how you make it. This is 4 units circuling around a unit.
 

Cidzero

Imma firin mah lazer!!!1!1
Reaction score
39
What I mean is, Do not use a new point created by a polar offset. If you only want them to move in a circle to where another unit was, then just move to the point of the unit.
 

mastah_

New Member
Reaction score
5
What I mean is, Do not use a new point created by a polar offset. If you only want them to move in a circle to where another unit was, then just move to the point of the unit.

i want them to move in a circle so they don't get smaller but iwill try that ok

kazuga urs looks weird...

cidzero that didn't work they circled still but still closed in on hero
 

mastah_

New Member
Reaction score
5
it may work well but it just looks like its big for what i want which shouldn't be that long of a trigger
 

Cidzero

Imma firin mah lazer!!!1!1
Reaction score
39
don't do an order every 0.8 seconds...

change the trigger to go 0.1, and to check if the current order of each units is stop, then order them to move to the next units position.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> order them to move to the next units position.

If they are constantly moving towards the nearest unit, they will all end up in the center.

> Do not use a new point created by a polar offset.

Actually, that's precisely what I would do here.
It makes sure the distance to the center is fixed.
 

mastah_

New Member
Reaction score
5
what do u mean check if current order is stop? why do that?

> order them to move to the next units position.

If they are constantly moving towards the nearest unit, they will all end up in the center.

> Do not use a new point created by a polar offset.

Actually, that's precisely what I would do here.
It makes sure the distance to the center is fixed.

what do u suggest then? go back to my original and set the distances to?
 

Kazuga

Let the game begin...
Reaction score
110
it may work well but it just looks like its big for what i want which shouldn't be that long of a trigger
It's really short really. If you look at it you will see that it's one part that is repeated 4 times since it's 4 units.
 

mastah_

New Member
Reaction score
5
what is urs supposed to do? i sorta under stand it ... like mine where they circle but they send off dmg if uget too close?
 

Kazuga

Let the game begin...
Reaction score
110
They have permanent immolation. The triggers creates 4 dummy units and makes them circle around the caster even when he moves.
 

mastah_

New Member
Reaction score
5
They have permanent immolation. The triggers creates 4 dummy units and makes them circle around the caster even when he moves.

hmm ok but it stills seems quite complex for what i want i mean look at this:

Code:
Set angle = (Angle from (Position of Wwcaster) to (Position of Wwdummy))
        Set angle = (angle + 2.00)
        Set CenterLoc = (Position of Wwcaster)
        Set MovetoPoint = (CenterLoc offset by (((Cos(angle)) x 300.00), ((Sin(angle)) x 300.00)))
i don't need the angel bit i don't think .. but whats the x300.00 for?
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> Set MovetoPoint = (CenterLoc offset by (((Cos(angle)) x 300.00), ((Sin(angle)) x 300.00)))

Set MovePoint = CenterLoc offset by 300 towards angle degrees (point with polar offset)
Is much simpler to use.
 

mastah_

New Member
Reaction score
5
The angle is what creates the circle, so it's quite needed.
on my first attempt at it i did use a real +2.00 (and tried 4.00)it didn't work ...

i'll use aceheats "insperational" map as a base to mine it looks much simpler


thxs all
 

mastah_

New Member
Reaction score
5
> Set MovetoPoint = (CenterLoc offset by (((Cos(angle)) x 300.00), ((Sin(angle)) x 300.00)))

Set MovePoint = CenterLoc offset by 300 towards angle degrees (point with polar offset)
Is much simpler to use.

i did that at first with real but for some reason it didnt work..

of the variables in the map what can i remove so it isn't askin for caster unit loc all time since it won't be moving
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top