Moving Dummy around

Status
Not open for further replies.
Level 18
Joined
May 11, 2012
Messages
2,108
hello there, Idk how to make the dummy unit moves around the hero

  • Water Shield Moving
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Set WaterShield_TrigUnitLoc = (Position of WaterShield_TrigUnit)
      • For each (Integer A) from 1 to 360, do (Actions)
        • Loop - Actions
          • Set WaterShield_Point = (WaterShield_TrigUnitLoc offset by 200.00 towards (Real((Integer A))) degrees)
          • Unit - Move WaterShield_Dummy[(Integer A)] instantly to WaterShield_Point
          • Custom script: call RemoveLocation(udg_WaterShield_Point)
      • Custom script: call RemoveLocation(udg_WaterShield_TrigUnitLoc)
I uploaded a video so you can see exactly what I want it to look like
http://www.youtube.com/watch?v=jUP98_RjCrA It's around 15-25 seconds of video
 
The basic formula is Speed = Distance / Time, where Distance is fixed (360 -> degrees).
So if you want the dummy to circulate your unit in 3 second, your speed should be;
Speed = Distance / Time
Speed = 360 / 3
Speed = 120

In 0.03 interval, it should be;
Speed = 120 * 0.03 = 3.6

Therefore, the dummy will move at speed of 120 range per second (3.6 range per 0.03 second), orbiting the origin unit.

The "speed" is the angle in this case.

  • Actions
    • Set Angle = (Angle + 3.60)
    • Unit - Move Dummy instantly to (Origin offset by DistanceFromOrigin towards Angle degrees)
    • Custom script: call RemoveLocation(udg_Origin)
 
Status
Not open for further replies.
Back
Top