units: no move without target

andrei009

Member
Reaction score
1
*solved* units: no move without target

Hi ,
How can I make units to move just if they have a target ? By target I mean enemy flying unit or owned flying unit, Because I'm trying to spawn units when a building, in my case a flying unit, attacks an enemy building or a different owned building and send a group of small units to attack that building or just go in that direction if building is owned. So the attaking 'small' units should keep going only between buildings and never stop. (I'll make an region around the buildings so when the 'small' units are around should explode and trigger some counter)
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
I'm a bit confused by your description, as well as your question: "How to make units move just if they have a target?".

This is what I think you're saying: A flying unit attacks a building. Multiple smaller units will fly towards that building until they get within a certain range, then explode. In which case you would spawn dummy units at the attacker's position and make them move to the building's position.
 

andrei009

Member
Reaction score
1
here it is a more simple discription :
I have couple of buildings on the map owned by players.
If a building cast a spell on another building it will create some swordmans that will RightClick on the targeted building.
If a swordman is near some building and the target of the rightClick order is that building then explode and do trigger some script.

My question is : How can I set swordsmans to not stop , halt , move , attack , except if the target of the order is a building ?
 

andrei009

Member
Reaction score
1
i solved it by putting all the buildings in array and the creep have the custom value set to the attacking unit all the time so when the creep is getting new order i check if that is a building and i update the custom value again
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top