Best way to do that?

FannyShaver

Well-Known Member
Reaction score
31
I am trying to implement more than 12 upgrades in one structure. In the first place idea was to create a dummy unit below the main building and sub ability added to both of them, in the first one that switches to the dummy one, and in dummy a reserve. Technically it would work that way, however, upgrade started in dummy wouldn't show up in the main one and vice versa. My question is, how would you sort that out?

I was for a while considering using a spellbook system, but I never tried that in my life before.
 

NeosDany

Member
Reaction score
1
This is my idea: create the main structure with upgrades using skills, when one is clicked create one unit with the ammount of upgrades for that type ex. clicking defensive upgrades open -> +50hp, +100hp -10atk, +150hp -10atk -8%atk speed. They way I think to do the show percentage thing is to create a dummy with lv1 meaning 10%, then add him 1 second, when he dies create the same dummy with lv2 meaning 20%, then do it until 100%, I don't know if you get my point, you can silence the main structure when it is upgrading. Say if you don't understand something...
 

OMGOMGOMG

UMBWGMG (Unidentified Human Being.)
Reaction score
28
Use spell books, if you don't know how to make one then search a guide. There's plenty about... I think :p
 

Imp Midna

Active Member
Reaction score
52
I once had a similar problem when i wanted my hero to chose from multiple abilities to learn in a structure. Therefor, it might be a problem for your case. Also, i hope you know how to trigger. So, here's what i did:
- Make a building and give them units to build. They also have a progress bar, and unlike upgrades, there is a neat trigger action referring to them. Give it ALL your units in the editor
- make another unit, no cost, no requirements, give it a suitable name for its purpose, like "next page" or smthn
- in a trigger in the map init, use the action "Player - Make x y for training/construction by Player(z)" to disable the units that do not belong to the first page
- use the event "Unit issued an order with no target" and make a condition so it only fires when your building(s) get an order
- in this trigger, use the GetIssuedOrderId() function to retrieve the order id
- compare the order id to the unit id of the "next page" unit (eg: if (GetIssuedOrderId() == 'e000')
- if this condition is true, switch some variable telling you at which page you currently are and use the player action from above to disable the units from the first page while enabling the units from the second page
-> the interface will show new units while queued units will still be built
- start a timer with 0 seconds
- when the timer ends, use IssueImmediateOrderById with the order it "851976" (i had to find this one by testing) to remove the queued dummy unit from the build queue
-gz, you got a multipage structure

bad part: when the building queue is full, you can not switch pages. Wasnt a problem for me as the units were instant-built, but it may be a problem for you, so consider this
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top