| 03-29-2004, 08:57 PM | #1 |
What I am trying to do is this: -You can build a building that will have a unit for sale. -The building has a stock of 4 units and then is sold out permanetly. -You can build as many of these as you want and each has 4 available and no restock. I can't figure out a way to make it so that a unit never restocks, the max I can do for restock time is 3600, which is not long enough, and I would prefer to be able to do a trigger that would remove the unit completely, not have a button with 0 stock that displays out of stock when clicked. I hope this is clear enough, if you need more info to help me out, please let me know. |
| 03-29-2004, 09:06 PM | #2 |
If I understand correctly. Make a ability for buildings, and when it is cast, set an interger +1, then trigger the move to make a unit. |
| 03-29-2004, 09:19 PM | #3 | |
Quote:
what your saying is do something like this right? Code:
unit casts a spell spell equal to (whatever) if x<4 create unit else nothing x+1 if x=4 remove ability from casting unit else nothing The problem with that is that I would have to come up with a huge array to store each buildings integer and do some kind of loop to make sure x is the correct building integer, or am I mistaken? If you think it would be easier than doing a huge array (which could actually fail if too many buildings are built) please give me an example, it doesn't need to be exact or anything. |
| 03-30-2004, 06:26 AM | #4 |
My recommendation would be to just set the initial number to 4, and the stock respawn time to 3600 (max time by tft editor, other mods exend this integer). 3600 is really only an hour, and I've seen 12900 or something like that from other editors. |
