HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Unit returns to start????

06-28-2004, 01:51 AM#1
c0nnick
I know this problem has been solved before, but I cant even think of where to start looking for that old thread so...

How do u make it so a unit doesn't return to its old point after ordering it to another one?

For example: I spawn a unit, then I order the unit to go somewhere else, and soon after, the unit returns to the spot it was spawned.
06-28-2004, 02:19 PM#2
Shimrra
You could, after it is spawned, order it to patrol to the new point. Also, you could create a region on each point and use a trigger that says 'when unit enters region, order unit to move to region.'

If you're looking for a trigger that allows the unit to move to a point, then move back and stay, with a changing point, you could try something like this sample spawn trigger:
Code:
Spawn Trigger
    Events:
        <YourEvent>
    Conditions:
        <YourCondition>
    Actions:
        Order (Last created unit) to move to PointB
        Wait ((Movement speed of (Last created unit)) / (Distance between points PointA and PointB))
        Order (Last created unit) to move to PointA
06-28-2004, 03:05 PM#3
th15
There's an AI trigger that looks something like "AI- turn off unit guard position". After each unit is spawned, make sure you turn off its guard position. Note that the unit will not be able to patrol once you have done this.