aquire unit order

Jedi

New Member
Reaction score
63
There is an event
Trigger:
  • Unit - A unit Acquires a target


But it is a unit event like a unit takes damage.
 

W!†A_cRaft

Ultra Cool Member
Reaction score
28
no, it doesn't work... try making it fire on a unit that was just standing and an enemy unit came in range, it wont fire this event.

What i need is this:
Imagine a patrol of creeps.
When you get in a certain radius, they would attack you. If you kill them, well, GG. But if they kill you, they should continue walking.

Now keep in mind i cannot use a "patrol order" because the patrolling routs are a bit more complex.

What i need, is to get the order that the creep in patrol had when he "saw" us. So that i can determine the order and the target point of the order, to make him "attack move" there when the fight is done.
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
even if you could save the order before fighting you can not get the target position of that order.

what i suggest:

1). use rally points. the units will save the position they are ordered to move to as their rally point. after a battle, order them to go to their rally point again.
pro:
easy and effective and MUI
con:
units will need the "rally" ability. this ability leaves an icon and changes the smart order to "set rally". that means you cannot use it for human owned units only for computer owned creeps.

2). initially create the points in an array. give them all individual indexes. when you order your creeps to move to one of the patrol points set the creeps custom value (or a similar Integer value like the level for some dummy skill, whatever) to the index number of that point. order your units to move to the point with the proper index number after a battle.
pro:
works for human owned units and such.
con:
needs initially created points, less effective, needs a way to save the index for the next patrol point.
 

W!†A_cRaft

Ultra Cool Member
Reaction score
28
hmmm what you think of this:

see what unit "acquire range" and make a trigger that fires when an enemy unit walks into range, then save the current order and save the target of the order (providing it is possible to track what the target is ?????) and mark the creep as "in combat" after it ends reset him to finish the order? If not, well i will do it with rally point, since i only need it for 'creep's and such
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
hmmm what you think of this:

see what unit "acquire range" and make a trigger that fires when an enemy unit walks into range, then save the current order and save the target of the order (providing it is possible to track what the target is ?????) and mark the creep as "in combat" after it ends reset him to finish the order? If not, well i will do it with rally point, since i only need it for 'creep's and such
you can only get the target of an order when the order is given. that means:
you need to store the target point for every creep yourself. either with rally points such as i suggested or you need point variables. but using one individual point variable for every creep you have is highly inefficient and not suggested.
you cant get the target point of an order with any native function exept when the order is given as an event response.
 

W!†A_cRaft

Ultra Cool Member
Reaction score
28
then i guess i will have to use rally points, thanks. Will see to wrap my head aroudn the new concept.

btw: i should then move rally points of units as i give them orders with triggers? they will never set rally point on lets say "attack this target", the target's position wont become rally ?
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
not player owned units will never set their rally points themselfs. the only way for not player owned units to have a rally point set is by having it set via a trigger action.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top