1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Rubbed the right way, the genie is out of its lamp! The 12th Concept Art Contest Results have been announced.
    Dismiss Notice
  4. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    Dismiss Notice
  5. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Buying Units

Discussion in 'World Editor Help Zone' started by Verdun, Apr 15, 2011.

  1. Verdun

    Verdun

    Joined:
    Jun 9, 2008
    Messages:
    138
    Resources:
    4
    Models:
    4
    Resources:
    4
    Hi again,

    In my project there is one unit type that is very cheap and spawned in large numbers. You don't even train them, you recruit them at the barracks, and instead of training time you have 'cooldown' (natural population growth, lol).

    Here's the problem: Selling units is very tricky.

    -If you upgrade a building that can't sell units into one that is supposed to sell units, it doesn't work, the units don't show up in the new building (though if you place it in the editor manually it DOES sell).
    -Likewise, if you uprade a selling unit into a supposedly non-selling unit, it DOES keep the buyable units.

    -Idem if it's a morph ability instead of upgrade.

    That might just a problem inherent to the system, what do you think?

    I tried to get around this problem by giving the building an ability instead that creates a "recruitpost" which in return is supposed to sell the units. But no, if it's summoned, it's just blank.

    I always try to use as few triggers as possible, but do you think this can be solved without triggers?
     
  2. Pharaoh_

    Pharaoh_

    Joined:
    Nov 6, 2008
    Messages:
    8,128
    Resources:
    11
    Icons:
    3
    Skins:
    1
    Spells:
    6
    Tutorials:
    1
    Resources:
    11
    You can use the "Charge gold and lumber" ability as a base one (don't forget to switch the Order string for each of the unit-types sold) and make the selling that way. So, when ability1 is used, create 1 (e.g. footman) at the shop's position (don't forget to store it into a variable and then "RemoveLocation()" it).
     
  3. Trillium

    Trillium

    Joined:
    Mar 8, 2009
    Messages:
    1,642
    Resources:
    0
    Resources:
    0
    Isn't there a GUI function to add a unit to a mercenary camp? Just make the game add those units to the upgraded building.

    Alternatively, you can replace the building with a fresh upgraded building via trigger, as soon as the unpgrading process has finished.