[Trigger] Wondering alone

Status
Not open for further replies.
Level 7
Joined
Jun 23, 2009
Messages
297
I created a special unit, wich is invulnerable, but as i dont want it to be used as a spy, i want it to be at a minimum distance from a player owned unit...
I mean, the unit is called Healer, and i dont want the healer to be used as a spy, so i want it to be allways close to a unit of the same player...
How can i make that? I seriously have no idea where to start...
 
I'm not quite sure what you mean..

However if you don't need to have the unit to attack, then set it's Combat - Attacks enabled to none in object manager. Then use unit - issue order targeting a unit - follow.

That's a simple solution, however not knowing your system it's difficult to say if it satisfies your needs.
 
I think he means he wants the unit to be invulnerable, but cant be used to follow the enemy heros/troops/ watch their base. I can only think of a way to do this as long as it is within the acual main town, using rects and other things. But thats only if thats what he wants
 
Yeah, Coolty thats what i want... Its invulnerable, so it can go anywhere, but i dont want it to be used as a spy... so if its not close to a unit owned by the same player, it goes back to base or something...
I thought of this:

  • Wondering
  • Events
  • Unit - A Unit Leaves (Region 1)
  • Conditions
  • Actions
  • Unit - Move (triggering unit) instantly to (region 2)

But i realased that, if i did it like this, the healer would be usless in combat, when the player invades the enemy's base... since they have to leave region 1...
 
Maker says it right... you might want to get the GetClosestUnit jass systme in the Jass section...

Then GetClosestUnit to the invulnerable unit,
then you check for whether the distance is greater or not then the distance you define;
if greater --> teleport.

You might want to be checking for the distance at 1 second intervals... I mean it doesn't have to be precise in this case you know...
 
Status
Not open for further replies.
Back
Top