I wrote these triggers to partially emulate the Rally Point action for units that weren't actually created at the building with the Rally Point.
Specifically, I wrote it to use in the
Pantokrator Footman Wars map for the spawned footmen units.
It does not replicate multiple-target rally points (as when you shift-right-click several times), and instead of the unit doing the intelligent follow action which WC3 TFT uses, instead the unit attack-moves to the position of its target when the unit is created.
So, it's largely imperfect, however, for a Footman Wars map, it's a huge improvement on not having Rally Points.
I've been thinking about messing around with the Patrol ability, since a unit that is Rallied on another unit has its "Patrol" button highlighted, but I don't know if there's actually some kind of Patrol action happening there, or not.
Also, I idly considered trying to expand the trigger by making a point array for each player's rally point, so that a multiple-right-click rally point would actually work, but it's not important enough for a tiny Footman Wars map to have that level of functionality. However, I invite anyone to improve upon this and post it here.
Quote:
Rally Point for point
Events
Unit - A unit Is issued an order targeting a point
Conditions
((Issued order) Equal to (Order(smart))) or ((Issued order) Equal to (Order(setrally)))
((Ordered unit) is A structure) Equal to True
Actions
Set pointArrayRallyPoint[(Player number of (Owner of (Ordered unit)))] = (Target point of issued order)
Set booleanArrayRallyPoint[(Player number of (Owner of (Ordered unit)))] = True
Set booleanArrayRallyUnit[(Player number of (Owner of (Ordered unit)))] = False
|
Quote:
Rally Point for unit
Events
Unit - A unit Is issued an order targeting an object
Conditions
((Issued order) Equal to (Order(smart))) or ((Issued order) Equal to (Order(setrally)))
((Ordered unit) is A structure) Equal to True
Actions
Set booleanArrayRallyUnit[(Player number of (Owner of (Ordered unit)))] = True
Set unitArrayRallyUnit[(Player number of (Owner of (Ordered unit)))] = (Target unit of issued order)
-------- Disable if the target is the player's townhall --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Target unit of issued order) Equal to unitArrayTownHall[(Player number of (Owner of (Ordered unit)))]
Then - Actions
Set booleanArrayRallyPoint[(Player number of (Owner of (Ordered unit)))] = False
Else - Actions
Set booleanArrayRallyPoint[(Player number of (Owner of (Ordered unit)))] = True
|
Quote:
Unit Dies with Rally
Events
Unit - A unit Dies
Conditions
(Dying unit) Equal to unitArrayRallyUnit[(Player number of (Owner of (Dying unit)))]
booleanArrayRallyUnit[(Player number of (Owner of (Dying unit)))] Equal to True
Actions
Set booleanArrayRallyPoint[(Player number of (Owner of (Dying unit)))] = False
Set booleanArrayRallyUnit[(Player number of (Owner of (Dying unit)))] = False
|