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

[Triggers] Ordering unit to build, but wait for player input...

Status
Not open for further replies.
Level 3
Joined
Jun 11, 2005
Messages
34
I have a probe. Now through Triggers I want to order the probe to build a structure (for example, nexus). Now here is the deal: I want it to "select" the "build nexus" command, but then let the player choose where to place that structure.

This is because I'm using dialogs for a custom interface building system.

Also, how to unselect the probe if you don't have enough resources to build said structure.
 
Level 3
Joined
Jun 11, 2005
Messages
34
There are trigger functions for "Issue Order - Build Structure".
As for checking minerals, make a condition for "Current Player Resource <= xxx"
xxx would be, as said for a Nexus, 400 minerals.



The thing is, that order can only be issued with a specific point established. As I said, if I order the unit to build a nexus, I have to (in the trigger) already tell the unit WHERE to build that nexus. I don't want that, I want the player to select the place where to build.

Basically, what I want the trigger to do is to select the unit, select the "build nexus" command but NOT issue the order, instead let the player select the location.
 
Level 3
Joined
Jun 11, 2005
Messages
34
Let me explain it this way.

Say you have a builder, like the terran VCE, and you want to build a supply depot.
These are the steps you do:
1 - You select the VCE.
2 - You select "build basic structure" command
3 - You hit the "build supply depot" command.
4 - You are given the choice to WHERE to build that structure (provided you can build there in the first place).

Now what I want is to, through triggers, do steps 1-3 automatically and let the player manually do step 4.

Essentially, I'd be emulating in a way the Command and Conquer building system since I'm using a dialog (though I'm not doing a C&C remake map).

Since I've failed to find a simple way to do this, and since I'm using a sort of gridded map, I've used some complicated ghost creation system added with regions to achieve *something* similar.
 
Last edited:
Level 11
Joined
Aug 1, 2009
Messages
963
Unfortunately, its impossible due to the way the system works - hiding the UI hides all that stuff, which is kinda annoying.

Anyways, one way you could kind of work around this is by using the Create Dialog Item From Template command, then making a command card. You can then click buttons on the Command Card to place structures and such.

You can find these templates here: http://www.sc2mapster.com/assets/dialog-item-templates/
I don't recommend actually using his system, as it is rather poorly made, but just using it as a basic reference as to how what he is doing is achieved, and to get the filepaths for various UI elements. :eek:
 
Status
Not open for further replies.
Top