• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[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