• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Order Variable to issue an order

Status
Not open for further replies.
Level 12
Joined
May 9, 2009
Messages
735
Hello I want to give a unit an order from a variable but can't seem to find a GUI way to do it. I found a thread about this on the helper but it has 0 replies since 2009. I want to use this for replacing a trained unit with another type of unit and keeping the relevance of the building's rally point.

Any help will be appreciated.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Do you want to set the rally point? If so you can do it.

If not, then you have to use custom scripts.
You will find out that the actual order might have a very different order string than the gui interface gives as orders.
 
Level 12
Joined
May 9, 2009
Messages
735
I think you have misunderstood. A unit is produced but I want there to be a 50% chance for another unit to spawn instead of the trained unit. Replacing the unit is no problem but keeping its original order from the building is. The rally point of the building initially has no affect on the new unit.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
well... now it gets a bit more complicated.

You can get the rally point of the building and use that to order the replaced unit to move to that point... or you will have to use an order tracking system... which i think that does not yet exist
 
Level 6
Joined
Oct 31, 2014
Messages
170
I dont know if you can save the handle of the previous rally point somewhere .. was that the question?
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
???

Who the hell removed that post that was between my 2 posts???

Well next to the three you mentioned:
"Issue order targeting a unit"
"Issue order targeting a point"
"Issue order with not target"
There are also:
"Issue order targeting a destructable"
"Issue order targeting an item"
"Issue train upgrade order"
"Issue research order"
"Issue build order"
"Issue drop item order"
"Issue move item in inventory order"
"Issue give item order"

But most of them are the same action actually.

the function that you want is "call IssuePointOrder(unit whichUnit, string order, real x, real y)"
You can save the order as a string in a variable and load that variable in a custom script from that function.
 
Status
Not open for further replies.
Top