• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Set rally point

Status
Not open for further replies.
Level 11
Joined
Jul 12, 2005
Messages
764
No, no you misunderstood me... I mean a building's rally point (you lcick on a building that trains units, then right-click somewhere, a flag will appear as a rally-point for the trained units). It can be place anywhere on the map, so it's not range.
Set Rally point to point / unit / destructible are the three actions, but none of them seems to set the rally point.
 
Level 4
Joined
Sep 20, 2005
Messages
72
thats strange...well i just tested this for you myself. i simply made a trigger firing on the
event: player 1 types -rally point as exact match
actions: order town hall to set rally point to position of blood mage

works perfectly fine! and i tried both in gui n jass (using IssuePointOrder).
perhaps test in a fresh map with a simple event? cant really imagine anything that would cause this... It does work though. for sure.
 
Level 11
Joined
Jul 12, 2005
Messages
764
Well, it's in jass, but the main point is that, i want the players to be able to set the rally-point only at a given region.
The trigger looks like:

Event - <Unit> is issued a point / target order
Cond - Order == setrally blah...
Action
//Now every action runs, instead of
call IssuePointOrder(u, "setrally", x,y)

The rally-point stays where it was set by the player, but it shouldn't be!
I'm not gonna paste the whole trigger, cause this is the only line i have problems with. And also jass is not allowed here...

Guys, could you please check this trigger if it works! With these events/conditions.
 
Level 4
Joined
Sep 20, 2005
Messages
72
ah i see the problem. Your event fires prior to carrying out the action of the issued order, so your forced order is being replaced by the original issued order that fired the trigger when it continues to be carried out afterwards (hope im not being too confusing here?). Put a wait before issuing order and it clears up. tested this, n it works!

However, i ran into another problem... the condition order == setrally does not work for some reason (i really dont see why not... =S its perfectly normal). Would a compromise of current unit order id work? (or would it just encounter problem #1 from above? my guess is that it would =/ ive only used current unit order id with "starts the effect of an ability" condition)
so yea, ran into 2 problems from testing. hope that helps!
 
Level 11
Joined
Jul 12, 2005
Messages
764
Oh, yeah, put a wait, or my other idea was to pause/stop/unpause the building, and then oreder it to "setrally".

Btw, i use the
GetUnitCurrentOrder() == 810752 (kinda number, you know)
condition, so i don't have problems with it..

Thx for helping!

EDIT
Ok, the pause/stop/unpause strcture solved my proble. It seems the order of the evets looks like this:
1. Building is ordered to place the rally-point
2. The whole trigger runs
3. The rally point is placed
Hell complicated :D:D
 
Last edited:
Status
Not open for further replies.
Top