• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Buying Units

Status
Not open for further replies.
Level 15
Joined
Jun 9, 2008
Messages
308
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?
 
Level 15
Joined
Mar 8, 2009
Messages
1,651
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.
 
Status
Not open for further replies.
Top