| 04-23-2007, 12:11 PM | #1 |
I want to make units that have a limit to the amount of them you can have, similar to how you can only have one hero of each type at a time. How could this be done? I could add a trigger to remove a newly bought unit once it's created if there is already one, but I want a more elegant way, that'd change the interface and grey-out the unit once you have it (or an x amount of it). |
| 04-23-2007, 01:09 PM | #2 |
If they are being purchased from shops you can simply remove them from the shop add a dummy item to the shop with a stock of 0. You can use a disabled version of the unit icon for the dummy item and it will appear greyed out. Alternatively you could just make the dummy item's stock start delay max so it never cools down. |
| 04-23-2007, 05:08 PM | #3 |
Since this was on my list of thing to do in my map, I'll add more to your question if you don't mind Ago :) Since it's a two team map, with five player per team, how can you prevent one player from buying anymore of the unit while the other 4 still can ? |
| 04-23-2007, 05:29 PM | #4 | ||
Quote:
Trigger: If you want it to be greyed out, just check how many are out, everytime a unit is built, and then remove an upgrade that the unit requires. Quote:
The same action will work fine, for this. I don't think there is a way to do it withought triggers, so this should probably be moved to the trigger section. |
| 04-23-2007, 07:10 PM | #5 |
Thanks a lot Conquestor, exactly the info' I needed. |
