Staredit Network

Staredit Network -> UMS Assistance -> Counters, Why You Should Use Them
Report, edit, etc...Posted by SaLaCiouS(U) on 2004-07-24 at 16:08:10
-= Intro =-

As it turns out someone was making a bound, and although the map was hypered, the explosions just didn't run by fast enough. There is however, a way around this, and that is Counters. I consider counters to be an extremely difficult concept to handle for most people, as very few people understand them. However, if you can understand how they work, you can greatly improve the quality of your maps.

-= What are they? =-

Counters, are simply that. A count. 1, 2, 3, 4 etc. You can use Unit Deaths, mineral counts from computer players, or anything else that you might think up.

-= When/how do you use them? =-

The main time to use counters is when your map is hypered. The idea behind using counters, is that every time your map runs through the triggers, it adds 1 point to the counter. Then you have a trigger you want to activate at a certain time, so you have it run when the counter reaches a certain number (ie: 5). At which point, you most likely have the counter reset to 0 once it reaches a certain number.

-= Why use them? =-

The main reason for using Counters is because Hypers screw up all the other waits in your map. Hypers can cause waits to wait for much longer then you set them to, and pretty much wipe out the possibility of you using waits. Any time you have hypers, I recommend using Counters instead of Waits.

-= Example =-

This is an example for a Bound, though there isn't much difference for other maps. Please note that each explosion requires a separate trigger. Also, I have never used counters in a Bound before, though I have assurances from EvilDrone(U) (Mario Bound, Mario Bound 2) that this is how it works for a Bound.

[Trigger] (This is the Counter)
[Conditions]
Always.
[Actions]
Modify death counts for Player 8: Add 1 for Terran Marine
Preserve trigger.
[End Trigger]

[Trigger] (This is the first trigger using the counter)
[Conditions]
Player 8 has suffered exactly 5 deaths of Terran Marine.
[Actions]
(Here you put actions for the first explosion, kill/create etc.)
Preserve trigger.
[End Trigger]

[Trigger] (This is the second trigger using the counter) [Conditions]
Player 8 has suffered exactly 6 deaths of Terran Marine.
[Actions]
(Here you put actions for an explosion, kill/create etc.)
Preserve trigger.
[End Trigger]

[Trigger] (This is the third trigger using the counter) [Conditions]
[Conditions]
Player 8 has suffered exactly 7 deaths of Terran Marine.
[Actions]
(Here you put actions for an explosion, kill/create etc.)
Preserve trigger.
[End Trigger]

And so on...

[Trigger] (This action Resets the Counter)
[Conditions]
Player 8 has suffered exactly 10 deaths of Terran Marine.
[Actions]
Modify death counts for Player 8: Set to 0 for Terran Marine
Preserve trigger.
[End Trigger]

-= Links =-

Information on using Counters for timers can be found Here

Trigger Design Philosophy using Counters can be found Here
Report, edit, etc...Posted by Stereo on 2004-07-24 at 16:12:27
Zerglings can run as fast as about a 4 point delay on 2x2 locations in a row. I forget exactly, cause I've always lowered it so they can't just follow the explosion.


The distinct advantage of course is that 2 obstacles don't interfere with each other. You can run them on different counters and have them cycle at different rates, too.
Report, edit, etc...Posted by Cloak(U) on 2004-07-24 at 16:25:55
Hmmm only uber map makers uses counters -_+ I'ma start using them happy.gif; Ty sala


Edit:
Bolt_Head> please don't use blur.
Report, edit, etc...Posted by SaLaCiouS(U) on 2004-07-24 at 16:48:35
Cloak, anyone can use counters. Also, we're both on Battle.net. Right now. IN THE SAME CHANNEL. The fact that you would make that post at all is obvious you are just in it for the minerals... whatever that means. More importantly, since when are you nice to me?
Report, edit, etc...Posted by BeeR_KeG on 2004-07-24 at 16:57:37
Hmmm.... nice idea you got there.

I just gave it a thought and I believe although it's more complex than the standart "waits" we all have acostumed to, I think counters are more efficient.

Counters will also let you use more patterns without having to use switches and many long triggers.

Good Work, whoever invented it.
Report, edit, etc...Posted by (U)Bolt_Head on 2004-07-24 at 18:40:54
I can't belive the example you gave for counters is the most useless thing to use them for.

Hyper triggers only mess up other waits IF there owned by the same player that owns the hyper trigger AND there placed after them.

Counters are just like switches in the fact that they have more than one use.
Report, edit, etc...Posted by SaLaCiouS(U) on 2004-07-24 at 20:20:35
I have never made a bound before, and I probably never will. The only reason I used bounds as an example is because the person I was trying to help was making a bound. Virtually everyone who asks me questions needs help on a bound. Maybe I'm just too nice biggrin.gif
Report, edit, etc...Posted by Tuxedo Templar on 2004-07-24 at 20:32:39
Nice? Coulda fooled me (thinks back to posts in A&O thread).

Anyway if anyone bothers to notice I've used counter-based triggers in my maps practically since I started making them, more than 2 years ago (the time of my first released ones, anyway; I've been doing mapping since SC came out). This is not anything new. But I do think its good for people to learn them, if they haven't already.
Report, edit, etc...Posted by Nozomu on 2004-07-24 at 21:27:41
Same here, Omega. It's not even the mark of an advanced mapper. Anyone who took algebra in high school should be able to connect the dots and use this stuff effectively. Maybe someone should make a "variables" tutorial or something. I made one for Trickz 'n' Stuff a while ago but it's pretty bad.
Report, edit, etc...Posted by Tuxedo Templar on 2004-07-24 at 21:29:43
The funny thing is, I took algebra before high school, and also many of the members here are not yet even in high school. tongue.gif
Report, edit, etc...Posted by Nozomu on 2004-07-24 at 21:37:32
Sucks to them smile.gif. It must be hard to use counters and advanced trigger functions without that kind of basic math knowledge. Did you ever stop to think that maybe certain people are better at mapping because they're good at critical thinking and problem-solving as the result of taking high-school math classes? It just might be true...
Report, edit, etc...Posted by DT_Battlekruser on 2004-07-24 at 21:43:34
QUOTE
I can't belive the example you gave for counters is the most useless thing to use them for.

Hyper triggers only mess up other waits IF there owned by the same player that owns the hyper trigger AND there placed after them.

Counters are just like switches in the fact that they have more than one use.


I forget.. can you place Hypers for unused players like Player 12 or will they not work like that?
Report, edit, etc...Posted by Nozomu on 2004-07-24 at 21:49:01
Nope. Triggers for players 9-12 will never run. So stick to comps or neutrals.
Report, edit, etc...Posted by CheeZe on 2004-07-24 at 22:16:11
QUOTE(Nozomu @ Jul 24 2004, 08:37 PM)
Sucks to them smile.gif.  It must be hard to use counters and advanced trigger functions without that kind of basic math knowledge.  Did you ever stop to think that maybe certain people are better at mapping because they're good at critical thinking and problem-solving as the result of taking high-school math classes?  It just might be true...

hmm...well i'm taking trig and i'm only a sophmore. but my skills in map making isn't as good as I want... but still you may have something there biggrin.gif

I"M GOING TO ASK FOR EVERYONES AGE AND WHAT MATH CLASS YOU'RE IN!!
Report, edit, etc...Posted by DT_Battlekruser on 2004-07-24 at 22:18:14
QUOTE
The funny thing is, I took algebra before high school, and also many of the members here are not yet even in high school.


I took algrebra in 6th.

QUOTE
I"M GOING TO ASK FOR EVERYONES AGE AND WHAT MATH CLASS YOU'RE IN!!


12 yrs old. Going into 8th grade and Honors ALgebra II/Trig. w00t.gif
Report, edit, etc...Posted by (U)Bolt_Head on 2004-07-24 at 22:49:05
QUOTE(Nozomu @ Jul 24 2004, 08:37 PM)
Sucks to them smile.gif.  It must be hard to use counters and advanced trigger functions without that kind of basic math knowledge.  Did you ever stop to think that maybe certain people are better at mapping because they're good at critical thinking and problem-solving as the result of taking high-school math classes?  It just might be true...

I think it is more creativity and having mathematical logic, than simply knowing your algebra. I don't know if algebra really helped me or not (I took Algebra I 5 years ago).

I belive people who do not figure out switches by themselves have no hope of ever becoming an advanced mapmaker. There logic reasoning skills are simply too low. I guess of course logic reasoning can be aquired.

I didn't struggle at all to figure out how randomization triggers work ether. I basically thought to myself well lets see if i randomize one it has a 50/50 chance and went from there. Within a few tries i had it down.
I am constantly annoyed when people ask "what is the trigger to do this". It is the pure mark of a person who has no problem solving skills. There isn't a magical trigger to do anyone thing. It is all about the idea, what you have and what you need to accomplish. Of course It isn’t bad asking a question, its just that some people make me think they keep a list of how to do everything they need to know and if it has any slight alteration they wouldn’t understand it.
Report, edit, etc...Posted by Nozomu on 2004-07-24 at 23:18:12
Agreed, agreed, agreed. In my earlier post I was just implying that most people have to develop their problem-solving and critical thinking skills with time and effort, it's not something many people are born with. In fact, as crazy as it sounds, I've probably learned more from experimenting with StarCraft's trigger system than I ever did from any math classes in high school.

I've always been wary of writing triggers out for people. I think that learning the trigger system requires a very well-defined base understanding, and if people don't have that, they can't "improvise" triggers on the fly. And really, improvising triggers on the spot is where the challenge in map-making lies. I don't mind when people ask "how do I cloak a Bunker", because even though I figured it out on my own, I didn't have to learn anything new about the trigger system. However, when people ask how to do an RPG battle system like Faith and Destiny, they aren't going to learn anything. I think that StarEdit.net should be more of a newb-friendly guide for this kind of thing, without neccessarily giving away the actual construction of the triggers. That should be done by the map-maker himself.

I guess I went off on a rant there smile.gif. It sure is nice to talk about this kind of stuff every once in a while with people who understand.
Report, edit, etc...Posted by Kow on 2004-07-24 at 23:49:29
I agree that you should learn and expiriment...
Report, edit, etc...Posted by Stereo on 2004-07-24 at 23:50:13
Well Staredit was the first program I ever did any kind of "programming" in. It helped me get used to the idea of using things for something rather different than they were intended to be.. I think school helped a bit with the knowing things, but some stuff you just have to know by intuition. My problem is that I make minor mistakes and then can't figure out where they are because things end up so complex.

On that other note I'm 17 and haven't ever taken algebra yet.. but I'm naturally good at math and I know the stuff related to Starcraft pretty well (probability, order of operations, quick in your head calculations type thing)

Trig is a lot more useful for warcraft 3 than starcraft as there's so much more you can control.
Report, edit, etc...Posted by SaLaCiouS(U) on 2004-07-25 at 03:14:33
censored.gif ...................... I just wrote out the longest post I have ever written, and spell check deleted the whole thing. So much for wanting to spell critiscisms(?) right.

Basically, I said that counters are barely Algebra. More like simple arithmatic to me. After that I went on to insult newb map makers for several paragraphs. Turning to a depressed state by the end, I had concluded they are like robots. They have no skills except what you teach them, and they follow what you say to the letter, no more, no less. Unless the forget what you said.

PS: Tuxedo, I was joking, I'm not nice, but I don't mean to be mean. I hope what I said was productive, and that you might take it into account in the future, otherwise it was for nothing.
Report, edit, etc...Posted by EzDay281 on 2004-07-25 at 05:00:02
Well, I just took pre-algebra, though I'd be learning more if the "honors" class at my school weren't full of idiots.
I'm pretty damned good at math compared to other people I see at my school(one person I asked took over a minute to realize that if "x" is a variable, with no information that can be used to find out what it is, you can't figure out X+10)
Well, thinking of ways to use and ways to setup counters is one of my favorite things to do in the subject of Staredit. And I found that "Mirror" map someone made with Hyper Triggers annoying, with the Civ that belongs to you, and a civ that belongs to the computer, and he just used a simple "Player brings civ to Location 1, order computer move to corresponding location". I mean, it wasn't anything new in anyway, as far as trigger use goes. But if he had used counters to keep record of the path your civilian is actualy taking...... that, and I was planning on making a midi-maker map for SC where you choose which notes toput in what order, and it stores the memory with counters, and you can play it back. Stupid idea, but bleh.
EDIT: Umm.. Reever, isn't that kinda... SPAMISH?
Report, edit, etc...Posted by Reever on 2004-07-25 at 05:22:58
hmm well im going into 7th lol so yea im a little kid lol.
Report, edit, etc...Posted by Cloak(U) on 2004-07-25 at 09:44:05
Gah? What happened to the counters arithmetic conversation??? You guys moved to math -_+

Edit by Bolt_Head> Stop using Blur
Report, edit, etc...Posted by Mini Moose 2707 on 2004-07-25 at 10:06:23
I remember some old quote off IRC..

[Dude] Khristian, you need to learn how to figure stuff out yourself.
[Khristian] how do i do that?

As far as math goes, 2 + 2 = 2². That's all you need. tongue.gif
Report, edit, etc...Posted by Kow on 2004-07-25 at 12:48:48
but 3+3 ≠ 3³
Next Page (1)