Circle Pathing/moviment speed

Klein~

TH.net Regular
Reaction score
0
I'm trying to make a skill like Spirits from DotA's hero called Wisp (http://www.playdota.com/heroes/guardian-wisp)

So, I just wanted to make some Dummies to move around the casting unit.
I got how to make a unit move in circles wherever it is, will move in circles:

Code:
[B]Trigger 1(Variable)[/B]:

Event
*Every 0.2 seconds.

Condition
-

Action
*Set Angle = Angle + 20

Code:
[B]Trigger 2(Variable)[/B]:

Event
*Every 0.2 seconds.

Condition
-

Action
*Order (Dummy) to Move To ((Caster Position) offset by 0 towards Angle(trigger))

Then I got to work it and the range of moving is proportional with the time on both triggers.

After doing it, I started integrating it on the skill.

I did:

Code:
Action:
*Create 1 Dummy for (Triggering player) at ((Position of (Casting unit)) offset by 400.00 towards 0 degrees))
*Turn on Moviment([B]Which is the [U]Trigger 2(Variable)[/B][/U])

But this is not working because trigger 2 does not has a "Casting unit" definition, I guess...

Please, help me on how does circle moviment works and how do I tell trigger 2 what is the "Casting unit"
 

TheKnight

New Member
Reaction score
1
You could always just make it so that when the unit casts the spell, you set him to a variable, and then make the unit spawn at that variable
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Polar offset of 100 angle is angle what you want it to be.

Answer is polar offset.

He IS using polar offset. Lol.

You need to use variables to store the units, or add the casting unit to a unit group and you can pick the caster every bla bla bla seconds, means you can use hashtables.
 

Klein~

TH.net Regular
Reaction score
0
I totally does not know about hashtables and I even doubt on how making a unit spin in a diferent velocity than normal moviment (0-522)

By the way, I'm using normal moviment and got the units spinning...
But I got another problem, after summoning the dummies and the casting unit walks, the dummies slowly keep spinning and walking to the position triggered. I would like to make them spin and stand at a range from the casting unit.

Better explaining:
Spirits from DotA moves when the unit moves, but they keep spining wherever they are.
My skill when casting unit walks, the dummies doesn't follow him a side of it, but slowly back to triggered possition

What would I need to do this?
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Something like that.

Trigger:
  • Untitled Trigger 001
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set hash = (Last created hashtable)


Trigger:
  • Untitled Trigger 002
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Spirits
    • Actions
      • Set point = (Position of (Triggering unit))
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • Set point2 = (point offset by 100.00 towards (60.00 x (Real((Integer A)))) degrees)
          • Unit - Create 1 Spirit for (Owner of (Triggering unit)) at point2 facing Default building facing degrees
          • Hashtable - Save (Angle from point to point2) as 0 of (Key (Last created unit)) in hash
          • Hashtable - Save Handle Of(Triggering unit) as 1 of (Key (Last created unit)) in hash
          • Unit Group - Add (Last created unit) to group
          • Custom script: call RemoveLocation(udg_point2)
      • Custom script: call RemoveLocation(udg_point)


Trigger:
  • Untitled Trigger 003
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in group and do (Actions)
        • Loop - Actions
          • Set angle = (Load 0 of (Key (Picked unit)) from hash)
          • Set caster = (Load 1 of (Key (Picked unit)) in hash)
          • Set point = (Position of caster)
          • Set point2 = (point offset by 100.00 towards (angle + 10.00) degrees)
          • Unit - Move (Picked unit) instantly to point2
          • Custom script: call RemoveLocation(udg_point)
          • Custom script: call RemoveLocation(udg_point2)
          • Hashtable - Save (angle + 10.00) as 0 of (Key (Picked unit)) in hash


angle = real variable
caster = unit variable
group = unit group variable
hash = hashtable variable
point = point variable
point2 = point variable
 

Attachments

  • Spirits Testmap.w3x
    18.2 KB · Views: 172
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