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

Buying Units

Status
Not open for further replies.
Level 13
Joined
Jun 9, 2008
Messages
248
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,649
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