• 🏆 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!

A JASS Question on Building Structures

Status
Not open for further replies.
Level 12
Joined
May 20, 2009
Messages
822
Is there any way to force a unit to construct a structure?

I see that this exists in Common.j native IssueBuildOrder .

But I'm not quite sure how to use it...Does it have any restrictions, like if the unit is Available/Unavailable (Using the Trigger Make Unit Available/Unavailable for construction)?

Are there tech requirements?

And is this how it would be set up? (Not using real things, just gonna describe)

Get Mouse Position
Check if Mouse Button is clicked
IssueBuildOrder

?

How would I figure out what building to build based on whichever button in the Command Card is pressed?
 
Level 5
Joined
Feb 22, 2013
Messages
161
The function does have some.. The player must have the resources (Gold and lumber and for units, the food) and tech-tree requirements to be able to build it.
 
Last edited:
Level 12
Joined
May 20, 2009
Messages
822
How would I go about checking which button has been clicked in the command card?

Otherwise I wouldn't know how to make sure which structure to build...

EDIT: Still need help with this. I'd like to know how to use it, how to figure out which building to build.
 
Last edited:
Status
Not open for further replies.
Top