K&M like building system

n4bieclimber

New Member
Reaction score
1
i was thinking of making a Empire building game in the style of settlers or K&M and i really like the idea of a K&M style building system. For the guys here that dont know K&M a quick runtrough.

u have a storehouse with all sorts of goods in it i have a system for this and it works like a charm. when u start a construction the builder units prepare the building site (not done yet but should be rather easy) then the Serves start running around to get the goods to the building site and drop them off. mostly just some wood and lumber. (done in other context) but then the builders start construction but put up the wooden frame first so they wont use the bricks for construction so they build up the frame every piece of wood that is there will turn into 50 HP of the building. so lets say i have a busy village and only 1 piece of wood arrives and builder have to start building from 1-50 and if a stone comes they musnt do anything?

srry for the wall of text and bad punc, but i cant explain it in any other way. MB i could find a youtube video about it to illustrate if its a bit vague.

can it be done? thanks.
 

asipo

New Member
Reaction score
15
Well for the start
If you want to halt a building construction progress
You can pause the building during construction using the Unit - pause trigger

So even the worker is repairing which is constructing that building (i did this test on human race)
The building progress wont move

un-pause the building back when the wood if given to the building
not sure how to track how many wood had been given and based form the wood how many % can be made
But my idea might playing with the current constructed building custom value which is Unit - set the custom value of
 

n4bieclimber

New Member
Reaction score
1
well thanks for the pause idea didnt think about that one.

for the wood problem

1st of all can i give the constructing building a inventory? or does it have to be finished? if so i could just make the wood stackable and put it in there and let it check if there is wood in there (i have 2 ways of doing that without constantly checking takes 2 triggers though)

2ndly could i check for items in range of but that might screw up if u have a lumber mill next to a constructing house? if i want to visually display the wood on the ground instead of in its inventory xD? but that could be solved with doodads if the first idea fails so i have items in the inventory and the doodads on the ground.

Just FYI as an example a lumber mill costs 3 planks 2 stones (always 1 stone les then planks) and every stone / lumber gives 50HP so the structure will have a total hp of 250 and will gain 20% of HP with each plank/stone
 

n4bieclimber

New Member
Reaction score
1
owk just another question i have this trigger but it doesnt do what i want
i want it to create a building site with 1 HP but if i do it like this he just starts with the usual 10% of the HP and if i use percentages i can kill the construction just as it builds (because the percentage or the health is lower then 0.5 hp and it destroys) or just like if i would use this one he starts with 10% hp of max HP

Code:
Pause constructing building 1 HP
    Events
        Unit - A unit Begins construction
    Conditions
        (Unit-type of (Constructing structure)) Not equal to Field
    Actions
        Unit - Set life of (Constructing structure) to 1.00
        Unit - Pause (Constructing structure)

Any solutions i have skimmed the map constants but couldnt find anything probably cause i dont know where to look for
 

n4bieclimber

New Member
Reaction score
1
for any people struggeling with the same issue heres the solution was kinda simple will never forget this xD

Code:
Pause constructing building 1 HP
    Events
        Unit - A unit Begins construction
    Conditions
        (Unit-type of (Constructing structure)) Not equal to Field
    Actions
        Wait 0.01 seconds
        Unit - Set life of (Constructing structure) to 1.00
        Unit - Pause (Constructing structure)

if a have a code like
Code:
    events
        a unit aquires an item
    conditions
        item type of aquired item is equal to plank
    action
        unpause triggering unit
        wait 10 secons
        pause triggering unit
it will interfere with each other if its triggered more then once in that 10 second marker right? cause it goes wrong and i dont know why.

another way to solve this is to be able to pause a unit when in reaches a certain HP ammount but i think a trigger that checks every 0.01 seconds will be a bit of a strain on the map. any ideas?
 
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