Staredit Network

Staredit Network -> UMS Assistance -> Help with Supply depots and minerals..
Report, edit, etc...Posted by RJ_Fighter on 2005-12-14 at 16:18:58
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".
Report, edit, etc...Posted by Kumano on 2005-12-14 at 16:49:25
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.
Report, edit, etc...Posted by Oo.Vic.oO on 2005-12-14 at 17:01:51
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
Report, edit, etc...Posted by RJ_Fighter on 2005-12-14 at 17:05:40
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?
Report, edit, etc...Posted by Oo.Insane.oO on 2005-12-14 at 17:45:59
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.
Report, edit, etc...Posted by fritfrat(U) on 2005-12-14 at 20:07:04
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!!
Report, edit, etc...Posted by Joshgt2 on 2005-12-15 at 06:37:21
You guys would be saying the wrong conditions... closedeyes.gif 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 blink.gif
Report, edit, etc...Posted by Kumano on 2005-12-15 at 07:33:44
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.
Report, edit, etc...Posted by Joshgt2 on 2005-12-15 at 14:27:42
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... blink.gif
Next Page (1)