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

Moving Dummy around

Status
Not open for further replies.
Level 18
Joined
May 11, 2012
Messages
2,103
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
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
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.
Top