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

Having 2 separate building menus (like in age of empires 2)

Status
Not open for further replies.
Level 3
Joined
Mar 22, 2009
Messages
35
In my map I want my builder to have 2 separate building menus. It's alot easier to understand what I meen if you have played age of empires 2. There the villager has one building menu for military buildings and one for other buildings and I want it to be exactly like that. Would appreciate if you could help me.
 
Level 18
Joined
Mar 7, 2005
Messages
824
There are some ways to make this, but first.. it's not possible to add another "build" menu itself..

The first way would be making a spellbook with all the buildings in it, as abilities without any function.. so they do nothing if you click on them.. except using it for our trigger that checks if you got enough money to buy it..

Another way would be replacing your builder with another one.. like you have 2 builders, one for defense structures and one for offense structures for example.. add 1 ability for each builder that contains some information like "Press this to change to offense builder menu" as you clicked the ability the builder gets replaced with the other builder.. and so on and so on.. think you get what I mean..
 
Level 3
Joined
Mar 22, 2009
Messages
35
Nice idea with making an ability that replaces the builder, I will try it out. :grin:

{EDIT}
It works perfectly except for one thing. If my worker is under attack then I can just press my switch building menu button and all units stop attacking him. If there's a way to fix that it would be perfect. Oh, and while we are at it, is there anyway to make a replaced unit resume the old units orders. For example: my worker is chopping lumber when I replace him, now the new unit resumes the old units orders and starts chopping lumber like. Hope u get what I meen ^^
 
Last edited by a moderator:
Level 18
Joined
Mar 7, 2005
Messages
824
For the attack part, just create a trigger that checks, if the unit is under attack..

I would try something like a wait trigger.. so check whenever the builder receives damage (so he's attacked) and then just add a wait actions like 1 or 2 seconds.. if the builder gets attacked within this wait time, then he's propably still under attack and the wait time expands.. while the wait action runs make the ability of the builder unusable.. like adding some research and name it "Not under attack" or something like that...
 
Status
Not open for further replies.
Top