Trigger help

Haelstrome

New Member
Reaction score
0
*Note: I'm not familiar with JASS*

Is there any way to set up an order queue for a unit?

I've tried making a separate even such that when an order expires to do another order, but sadly there's no event where "A unit finishes an order".

I'm trying to implement this in replace of the traditional anti-block system (attacking/destroying towers). The idea is that I can tell unit A to move to region A and if he is blocked, he will finish the "Move to point" order when he reaches the blockage, and I could execute a new action like, "Move unit to region A instantly" by queue or separate trigger.

Any ideas/suggestions? Thanks.
 

Hadezown

TH.net Regular
Reaction score
5
Well you could use the fact that they attack when blocked to your advantage:

Code:
Events
    Unit - A unit Is attacked

Conditions
    (Unit-type of (Attacking unit)) Equal to BlockedUnit

Actions
    Set AA_Point = (Center of (New Position))
    Unit - Order (Attacking unit) to Move To AA_Point
    Custom script:   call RemoveLocation(udg_AA_Point)

The event catches the unit and moves it before it does any damage to whatever's blocking it. You would have to also track where on the map the blocked unit is with more regions. I would suggest more if I had a better idea of the path layout.
 

Haelstrome

New Member
Reaction score
0
The problem is that for some reason the units do not default to attacking the towers, I don't know why.

Is there some kind of property to the unit that makes it resort to attacking?

Edit: This is only for my custom made units; when I substitute it for a regular unit, the regular unit attacks my towers.

Any explanation?
 

Hadezown

TH.net Regular
Reaction score
5
Not sure why they aren't attacking.

edit: Oh nvm didn't read the original post properly give me a few I'll try to figure this out for you. Someone smarter will probably come along though :)
 

Haelstrome

New Member
Reaction score
0
Thanks, actually I figured it out. Apparently I based my custom units off of peasants which for some reason won't attack. I changed it to footmen and now they attack when blocked. :)

Thanks for the idea for teleportation on attack, though.

Thanks.
 
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