QUOTE(WoA-Felagund @ May 25 2004, 05:50 PM)
Jebus... you people! I'm sorry that you don't think I'm 'advanced,' I'm simply better in different areas than you are. I'd hate to see what LotR maps you could come up with : ) Let's relate this to authors! I'll make myself a Fantasy author and you guys can be Sci-Fi authors. We're both authors (map makers) but we make different types of stuff. See? Okay, with that said, the average Joe needs to know how to do crap. How do you do these... counters? I'd love to know! You keep on speaking on them, but I've been rather tardy coming into this website (I've been here about 2 weeks). So, if you'd please, recite the step(s) for a fledging map maker!
So if your so advanced in making Lotr maps why are you asking us for help in them? Besides i personaly hate lotr maps. The only thing worse is RP maps.
QUOTE(Yoshi Da Sniper)
Anyways, you know of course that 1000 miliseconds = 1 second.
He will proboly be pissed that you asked that yoshi. It isn't out of the ordinary for extreamly long waits to be in lotr maps like that. Im sure he knows how long it is.
Felagund: Counters can take a few differant forms but all work the same way. I'll use minerals as an example because it is less abstract.
Say you want a pause 20 seconds long. It is of course not a good idea to use a wait as we have established. So what we do for our element of time is we rely on the refresh rate in witch triggers fire. Triggers fire about once every 1.5 seconds. (about 11 times per second with hyper triggers). What we do is create a loop that subtracts or adds to a number until it gets to the point we need it at. I'll using adding for my example.
Players:
-Force 1
Condtions:
-Current player accumulates at least 1 minerals
Actions:
-Add one mineral for current player
-Preserve trigger.
This of course will keep adding minerals. So now back to our 20 seconds and how to incorperate it.
Say you have this trigger
Condtions: switch "storyline" is set
Actions: Display "hello" / wait 20,000milli / Display "Huh?"
To avoid this wait we can use these triggers
Conditions:
-Switch 'storyline' is set
Actions:
-Display "Hello"
-Set resources to 1 mineral for current player.
Conditions:
-Current player accumulates at exactly 15 minerals
Actions:
-Display "Huh?"
And of course you use the trigger above that adds minerals. You might have to play with the values to get them exactly how you want. It is more accurate if you use hyper triggers with larger values.
Now most likely your using minerals and gas for your map so we can't just use that. That is where death counters (or custom score) comes in handy. There are over 200 units in Starcraft (i always forget the exact number) and you can set deaths for each of them. First thing you need to do when selecting a death coutner is to find a unit that is not used in your map or it is impossable for it to die. This is because if the unit dies while the counter is being used it could cause problems (not so much for your trigger). I personaly use critters, powerups, and minerals alot. To use them just replace my example of minerals with the Set Deaths action and the Deaths condition.
Some other uses for counters.
-Setting deaths is sometimes used a kind of supper switch. Rather than createing a switch for each player. Deaths are individual to each player, unlike switches.
-Another example is to store a numbered value of information. Such as the obstical number in a bound. or the Upgrade level of a hero in a RPG. Useing one counter for things like this rules out dozens of switches that might of been used.
Some Helpfull hints:
-Counters are really helpfull because they work indpendantly for each player.
-I personaly like to use 0 as a null state for a trigger like this. Since i use the conditions "at least 1 mineral" for the counter trigger then it doesn't count until i set it to 1 or higher. Then when your done you can set the value back to 0 untill you need to use the counter again.
-Make sure you don't use the same counter at the same time.
-Counters for your purpose are better when used with hyper triggers.
Lastly, Death Score / Counters are something you get more and more accustomed to the more you use them (like switches). If you have any more questions about them feel free to ask.