Ok, in my n00b defense map, I want a supply depot (Bunker in production) to be removed if you don't have enough minerals to buy a type of bunker unit. How can I do this?
For example, if Joe Shmoe makes a supply depot and he doesn't have enough minerals to get marines to go into the bunkers, then his newly made supply depot will disappear, saying "Not Enough Minerals".
Well, if the supply depot can only be 1 type of bunker, then you could simply set the depots cost. Otherwise, in the trigger that would turn it into a bunker, put an 'Accumulates at least X minerals'. Then make another trigger, which detects if they have a supply depot and dont have enough minerals, that it removes the depot (At most X-1 minerals)
X = the cost you want it to be if you didn't get that.
Conditions:
current player has 0 minerals
current player command at least 1 supply depot
actions:
remove all supply depots at anywhere
preserve trigger
that should work

QUOTE
Conditions:
current player has 0 minerals
current player command at least 1 supply depot
actions:
remove all supply depots at anywhere
preserve trigger
that should work biggrin.gif
But, the units have different prices. Should I make a trigger that makes any mineral count under 9 go to 0? >.<
EDIT: I made it so if someone trys to build a depot at 5 minerals, it won't build. THe same goes for 0 minerals. All the units are based on multiples of 5. Would this work?
If there were beacons to choose unit than do this
Example Marine costs $2
Current player commands 1 supply depot
current player brings 1 (unit) to location Rine
current player commands at most 1 mineral
Kill all supply depots anywhere
ect.
If each and every unit costs a different amount, then you would have to be like..
If current player wants to buy a 15 dolla unit and only has 14 dolla,
then remove all supply depot for current player.
But you would have to do it for every single unit with different prices..
My suggestions:
1. Give them the scv when they buy the unit, and remove it after the bunker is made.
OR
2. Set the costs of different terran buildings corresponding to each unit.
You could even expand upon this by having a "5 dolla area," "10 dolla area," etc. where you choose what you want to go into a 5 mineral building if you build it, choose what you want for 10 minerals, etc. This way you are not as limited by the number of terran buildings. That is what I would do.
Good luck with your map!!
You guys would be saying the wrong conditions...
it would be something like
| Trigger |
| Conditions: |
| ¤ Current player accumulates at most X (1 mineral under the desired total) minerals |
That would be what the main condition would be. If you said at least then there wouldn't be a point in the whole minerals idea
Ok,
First, you would want to make sure for every different bunker you would need an 'accumulates at least X minerals' (like I said earlier..)
Then have triggers like:
| Trigger |
| Conditions: |
¤ Accumulate at most (X-1) Minerals
|
¤ Commands at least 1 supply depot.
|
| ¤ Switch 'Unit 1' is set (or death count or whatever) |
| Actions: |
¤ Remove all supply depot for current player.
|
¤ Display text: "Not enough minerals"
|
| ¤ Preserve Trigger |
Then copy that for every different unit making the switch/death count set to 'Unit 2' and changing the amount of minerals you could have at most. This is basically what I meant in my first post.
Switches would work that best. That way you can turn the unit on and off. When you go from unit 1 (marines) to unit 2 (firebats) then just make a switch saying to clear unit 1 switch and all of the other unit switches and set unit 2 switch. Hope this wasn't too hard to understand...