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

How to make multiple 'Build Structure' buttons?

Status
Not open for further replies.
Level 2
Joined
Oct 18, 2009
Messages
5
I'm creating a custom game and I have several wall sections (vertical, horizontal, small versions of vertical and horizontal and same with gates) along with several buildings and towers. I have two different builder units for different levels of technology however I'd like to keep just the two builders and create a second Build Structure button for one of them so I can house all the wall sections and gates within just the one build structures button (obviously named something else) and then have all the regular buildings within the original build structures button.

I've looked around both in the editor and searched the internet for any help and have yet to come across anything. I'm very good with the editor so if anyone knows how or has any ideas I can try, that would be excellent!

Hopefully this makes sense. Thanks :)
 
Level 9
Joined
Nov 4, 2007
Messages
931
Well if you want it all in a single unit you wouldn't be able to do it without triggers, having two different tabs on a single unit for building though isn't possible, a way you can accomplish giving a single unit different building options would be I think adding all buildings that you want that unit able to build into its Techtree Structs built, then changing their availability status via triggers, for example lets say you want to change the unit to build walls instead of gates:
  • Change Buildings
  • Events
  • Player - Player 1 Red types a chat message containing -walls as an exact match.
  • Conditions
  • Actions
  • Player - Make Gates Unavailable for training/construction by Player 1 Red
  • Player - Make Walls Available for training/construction by Player 1 Red
 
Level 2
Joined
Oct 18, 2009
Messages
5
Oh that's a good idea. I'll try that out. Thanks :)

In another forum some people suggested using a spellbook and creating abilities from the 'Build Tiny' special items abilities and putting those in the spellbook however that never worked right. It would only create one of the several wall pieces I creates via the build tiny abilities every time. the spellbook worked fine with actual abilities but never more than a single build tiny ability :(
 
Level 2
Joined
Oct 18, 2009
Messages
5
I was informed about the ID thing and used a separate 'build tiny' ability for each wall segment and it still was doing it. For example i used build tiny barracks, build tiny farm, build tiny blacksmith and build tiny lumber mill, each for a different wall piece. I would still get the same wall piece no matter which i clicked. Now i know the spellbook ability itself has a base order ID which should be different for each spellbook or they get mixed up however I'm only using a single spellbook and even when i didn't put the build tiny abilities in the spellbook and just as a unit ability, it would still only build a single wall piece rather than the four i was testing.
 
Level 2
Joined
Oct 18, 2009
Messages
5
Well if you want it all in a single unit you wouldn't be able to do it without triggers, having two different tabs on a single unit for building though isn't possible, a way you can accomplish giving a single unit different building options would be I think adding all buildings that you want that unit able to build into its Techtree Structs built, then changing their availability status via triggers, for example lets say you want to change the unit to build walls instead of gates:
  • Change Buildings
  • Events
  • Player - Player 1 Red types a chat message containing -walls as an exact match.
  • Conditions
  • Actions
  • Player - Make Gates Unavailable for training/construction by Player 1 Red
  • Player - Make Walls Available for training/construction by Player 1 Red

This works great for what I need. I've just made two dummy abilities that the player can click on the builder before going into the build structures menu which will switch out the tech trees from walls to primary structures. :D

If it's possible, is there a way to have the 'Build Structures' button be clicked or have it open the build structures menu by any chance from within a trigger? This would make my dummy ability be able to both switch the tech trees to allowing walls or primary structures to be built along with opening the build structures menu and have the wall structures appear as if it was a second build button as well as going backwards when the build structures button is clicked. Just a shot in the dark. Either way, the tech tree trick works nicely :)
 
Level 5
Joined
May 31, 2009
Messages
122
This works great for what I need. I've just made
If it's possible, is there a way to have the 'Build Structures' button be clicked or have it open the build structures menu by any chance from within a trigger?



You could create another button from a dummy abilty, that when clicked, (event- unit casts ability), it swaps the build ability. That way, people dont need to type it up "-wall" or something.
 
Status
Not open for further replies.
Top