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

[Trigger] Making unit move forever

Status
Not open for further replies.
Level 5
Joined
Nov 4, 2006
Messages
132
I want to make it so that a unit keeps moving forward even after it has reached the point you told it to move to. (like in worm wars)

Could someone please give me a gui trigger that would do this.

Also if I had a unit doing this would I still have it able to turn really slowly?
 
Level 9
Joined
May 27, 2006
Messages
498
Just order the unit to move to the place in front of it every some time, like that:
  • Blah
    • Events:
      • Time - Every 0.1 seconds of game time
    • Conditions:
    • Actions:
      • Set TempPoint = (Position of [your_unit] polar offset by 100 angle (Facing of ([your_unit])
      • Unit - Order [your_unit] to move to TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
  • Set TempPoint = (>>>>>>>>Position of [your_unit]<<<<<<<<<< polar offset by 100 angle (Facing of ([your_unit])
  • Unit - Order [your_unit] to move to TempPoint
  • Custom script: call RemoveLocation(udg_TempPoint)
2 locations generated one destroyed = 1 location remained to pwn you
 
@Vampireguy: best solution ever

VampireHeart, learn to read.

lol :p

Anyway...

You could cange it to "point in region" and set the region to move with the unit.

And just make shure that the points are selected in line with the units "facing angle".

Dont know if thats possable but worth a try.
 
Level 9
Joined
May 27, 2006
Messages
498
@VampireHeart
Well, we dont know what the unit's speed is :p And 100 is really short distance, so it would look a bit crappy - unit stopping and suddenly moving forward, so i decided to order unit every short period of time to move on a short distance (to avoid walking around obstackles, other units, etc.)

Also, as Need_O2 pointed my fault, i added additional point var to remove (this was why the lagg occured):
  • Blah2
    • Events:
      • Time - Every 0.1 seconds of game time
    • Conditions:
    • Actions:
      • Set TempPoint = (Position of [your_unit])
      • Set TempPoint2 = (TempPoint polar offset by 100 angle (Facing of ([your_unit])
      • Unit - Order [your_unit] to move to TempPoint2
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call RemoveLocation(udg_TempPoint2)
 
Status
Not open for further replies.
Top