HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How to follow/protect a unit?

08-16-2006, 07:37 PM#1
Bacalhau
Hi guys,
I haven't posted here in a while, last time I got help was when I made a CTF map and you guys were a great help.

So after a lot of downtime I'm making maps again but I need a little help.

I have a Kodo (computer controlled) travelling a path in my map and I want to have like 4 computer units follow and protect the Kodo while it travels along the path. I've tried making a Region and have it follow the Kodo and make the Guards Attack-Move to the region but that ins't working...

Anybody have any suggestions as to a way I can do this?

Thanks for the help.
08-16-2006, 07:50 PM#2
SFilip
i believe ordering attack-move to the position of the kodo directly would work well.
08-16-2006, 07:53 PM#3
Fireeye
Unit - Issue Order Targeting a Unit
should solve it, just set it to Unit - Order <Your Unit> to Follow <Kodo>.
08-16-2006, 08:15 PM#4
Bacalhau
Quote:
Originally Posted by SFilip
i believe ordering attack-move to the position of the code directly would work well.


What do you mean?

Quote:
Originally Posted by Fireeye
Unit - Issue Order Targeting a Unit
should solve it, just set it to Unit - Order <Your Unit> to Follow <Kodo>.

Hey thanks that worked.
Except there's a problem. They follow the Kodo and everything but they don't protect it or themselves. They completely ignore enemies.

Any suggestions?
08-16-2006, 08:27 PM#5
st33m
You could order them to attack move to the position of the Kodo instead of following it.
08-16-2006, 08:35 PM#6
SFilip
what i meant is something like
Trigger:
Unit - Order <protecting unit> to Attack-Move To (Position of <kodo unit>)
this is issue order targeting a point btw.

and sorry i wrote code instead of kodo in the post above...lol
edited
08-16-2006, 09:33 PM#7
karukef
The problem with a unit moving after an allied unit is that the following units will only attack if the unit they follow attacks, btw.
08-16-2006, 09:35 PM#8
The)TideHunter(
That should work.
But only once.
It would need a constant update, GetUnitLoc isent sync'ed, so dont expect it to follow the unit, the second its run, it will attack move their, end of story.
It leaks a location.
Im sorry for the critism's, but recently i realised why i do make critism's that are so small.

I suggest either using Vexorian's pet code, which does exaclty what you want, a unit that follows a different unit, protects it etc.

Or

Wait until tommorow and il make you a small code for all 4 of them, with a polar offset. Every 90 degrees.
Example:
Code:
   [1]          [2]

     [Your Unit]

   [3]          [4]

So they are always in that perspective of the unit.
08-16-2006, 09:37 PM#9
st33m
Yes, the pet code would work nice. It is easy to impliment, and works well.
08-16-2006, 10:23 PM#10
Bacalhau
Quote:
Originally Posted by st33m
You could order them to attack move to the position of the Kodo instead of following it.
Quote:
Originally Posted by SFilip
what i meant is something like
Trigger:
Unit - Order <protecting unit> to Attack-Move To (Position of <kodo unit>)
this is issue order targeting a point btw.

and sorry i wrote code instead of kodo in the post above...lol
edited

Good idea, tried that but The)TideHunter( has a point.
Quote:
Originally Posted by The)TideHunter(
That should work.
But only once.

Hmm... I thought this would be something a little less complicated.

What exactly is Vexorian's pet code? Will it work with Warcraft III: Reign of Chaos?
08-16-2006, 10:34 PM#11
The)TideHunter(
Im not sure if it will work with RoC.
Some functions Vex uses might not be in RoC, and i dont know if RoC lets you use Jass.
You might have to contact Vex via his forum on Wc3c to get the correct answer, if anybody knows about his system, its him.
08-16-2006, 10:43 PM#12
sheep.spirit
lol, just 1 thing, never work with WE in RoC, it has lots of things missing and also, it doesnt have an import manager
08-16-2006, 11:26 PM#13
Naakaloh
Order the unit to "patrol" to the target, this has the same effect as a "smart" (right-click) order on the unit and will cause it to follow a unit it when it moves and guard it when there are enemies nearby or when the unit attacks.
08-16-2006, 11:45 PM#14
st33m
You could order the attack move every second or so, if you wanted.
08-17-2006, 03:03 AM#15
Vexorian
For the record, as long as RoC is patched to latest version, it can use any JASS native (multiboards, damage stuff, etc) Somehow World Editor wants to make you think that you need tft for them but that's not true (just don't use GUI)