Staredit Network

Staredit Network -> UMS Assistance -> question
Report, edit, etc...Posted by sharf on 2006-04-20 at 20:32:23
ok i'm making a map were u have farms, and every so often more food is created, i want to know how do u make it so that at the end of the time limit u get 1 min for each farm u have, can i do this whitought doign a crap load of triggs?(meaning 1 for each farm which limits the amount) and also i can make the harvesting of crystals(liek uraj) auto, like center on crystal order unit move to collects it order return but an i do that with multiple ones? like make any number of probes collect crystals? liek collect the closest one?
Report, edit, etc...Posted by Kupo on 2006-04-20 at 20:41:30
well you have to have a timer in your for your map. so what you do is this.


Trigger
Description:
crop thing
Conditions:
¤ Elapsed time is exactly "whichever"
¤ Current player commands atmost 1 farm
Actions:
¤ preserve trigger
¤ comment your trigger
¤ set resources current player add 2 ore

Report, edit, etc...Posted by Urmom(U) on 2006-04-20 at 20:46:32
If you don't want to have to do that for each one, you could create a burrowed unit under the building when its made and have a cycle ckecking and giving to do the minerals and then eventaully give all of the burrowed units back.
Report, edit, etc...Posted by Mini Moose 2707 on 2006-04-21 at 11:13:42
This is how I would do it, it gives all the minerals in one trigger loop.
Trigger
Conditions:
¤ Countdown timer is 0
¤ Player has suffered 0 deaths of someunusedunit
Actions:
¤ Set Deaths of someunusedunit for Current Player to 1
¤ Preserve Trigger


Trigger
Conditions:
¤ Current Player commands at least 32 farm (or whatever you think the max will be based on a multiple of 2, eg 64, 128, 256, 512, 1024)
¤ Player has suffered 1 death of someunusedunit
Actions:
¤ Add 32 minerals for player
¤ Give 32 farm owned by current player at anywhere to P12
¤ Preserve Trigger


Trigger
Conditions:
¤ Current Player commands at most 31 farm
¤ Current Player commands at least 16 farm
¤ Player has suffered 1 death of someunusedunit
Actions:
¤ Add 16 minerals for player
¤ Give 16 farm owned by current player at anywhere to P12
¤ Preserve Trigger


Trigger
Conditions:
¤ Current Player commands at most 15 farm
¤ Current Player commands at least 8 farm
¤ Player has suffered 1 death of someunusedunit
Actions:
¤ Add 8 minerals for player
¤ Give 8 farm owned by current player at anywhere to P12
¤ Preserve Trigger


Trigger
Conditions:
¤ Current Player commands at most 7 farm
¤ Current Player commands at least 4 farm
¤ Player has suffered 1 death of someunusedunit
Actions:
¤ Add 4 minerals for player
¤ Give 4 farm owned by current player at anywhere to P12
¤ Preserve Trigger


Trigger
Conditions:
¤ Current Player commands at most 3 farm
¤ Current Player commands at least 2 farm
¤ Player has suffered 1 death of someunusedunit
Actions:
¤ Add 2 minerals for player
¤ Give 2 farm owned by current player at anywhere to P12
¤ Preserve Trigger


Trigger
Conditions:
¤ Current Player commands at least 1 farm
¤ Player has suffered 1 death of someunusedunit
Actions:
¤ Add 1 mineral for player
¤ Give 1 farm owned by current player at anywhere to P12
¤ Preserve Trigger


Trigger
Conditions:
¤ Current Player commands at most 0 farm
¤ Player has suffered 1 death of someunusedunit
Actions:
¤ Give all farm owned by P12 at anywhere to Current Player
¤ Set Deaths of someunit for Current Player to 0
¤ Preserve Trigger


Hopefully you can figure out the style of the triggers.
There's 2 important things, relating to one fact, the triggers must account for all the farms in one loop:
1. The triggers must provide for the correct max # of farms. If they have more, not enough farms will be given, the last trigger won't fire, and the next player to run the triggers will screw it up. You might want to have triggers going up to 512 or 1024 to be safe - 2048 is definitely a concrete maximum (unit limit) if you want it to be perfect. To make the system bug-free will be worth the extra two or three triggers.
2. The triggers with the farm amounts MUST be from greatest to least, or it won't finish in one loop, and the next player will screw it up, as mentioned above.
Report, edit, etc...Posted by l3liZzArD-X on 2006-04-21 at 19:29:21
lol.... you might aswel have done the trigger work on the map for him it would of been faster
Report, edit, etc...Posted by dumbducky on 2006-04-21 at 19:55:39
Moose is a good with triggers.

I would do what PCFred did in Majesty. He gave all money buildings to some player. Then the other player gave them back and boosted your minerals.
Report, edit, etc...Posted by Steel_Hand55 on 2006-04-22 at 00:04:48
that's essentially what moose did (if i can read correctly wink.gif), and about the autoharvest; i have an idea on that. you need 2 locations, 1 for your CC which i assume is where you'll drop the crystals off, and another for crystals. then, when someone wants to harvest crystals, all they have to do is bring an SCV to the CC. first, you'll want a trig that always centers the CC location on teh CC ( i won't insult ur intelligence by describing this). then, what you'll do is this: if current player brings at least 1 SCV to 'location CC', p(whoever you chose crystal to be for) commands at least 1 crystal; then center 'location crystal' on crystal owned by p(whomever), order 1 SCV at location CC to location crystal, give 1 crystal owned by p(whomever) to p(someone other than "whomever" wink.gif), preserve. that way, it won't get a repeated loop, and it'll order SCVs to the crystals (if there are any).

And, as usual, my post is goshawfully long. And, as always, i hope it helped!

P.S.: Oh, and by the way, if you used Moose's system, make sure that in the last trigger, you reset the countdown timer. Moose might've forgotten that, or just didn't consider it relevant.
Next Page (1)