Death Counters
Oct 11 2007, 1:01 am
By: Jello-Jigglers  

Oct 11 2007, 1:01 am Jello-Jigglers Post #1



I was just wondering:

1) What the best way to set up death counters is?
2) What is the advantage of using this method.
3) Why would I want to use death counters in my map?



None.

Oct 11 2007, 1:16 am Hugel Post #2



3- Why would you want to use death counters? You should want to use death counters when you want timing and varibles to be hidden from the player. If all you want to have happen is for something to happen in 2 mins, and you don't mind showing those 2 mins on the screen, use the on-screen timer. But, if you don't want the player to see when something will happen, it must be hidden. You can use death counters to hidden a timer behind the scenes. Death counters can also be used to keep track of multiple timers at once, as many timers as you have open units, and open players.

2- The advantage? The player never has to actually see what is happening. It will seem like things are natural. In the case of something happening every 2 mins, unless the player times it themselves with a watch, it will seem random. If you were to use the on-screen timer, people would know when to expect something. If you were to use an on-screen method of a unit moving from one location to another, or a unit killing another over and over, the player would again be able to see these things happening. It would also take up space on the map, or the valueable on-screen timer, which you only get one of.

1- What is the best way to set it up? There are a number of ways to do it, and it depends on what effect you need to achieve. For a built in timer to entering and exiting buildings, its fairly simple. Have a trigger that will always add 1 to a death count. I usually throw all trigger actions that need to run continuously on a map into one complete trigger right at the top. These are all the things that always need to be occuring. When you go to the building entrance, and the death count is high enough, I use around 45, then enter. Set the same death count back to 0. Then, code the exit trigger with the same death count. Death counters can be used for virtual cash, RPG Levels, health, and mana power. Every time you deem the player ready for another level, simply add 1 to the "level" death count, then code each "level" with respect to the death count, ie. Death count = 1, Heal to 10% Death Count = 2, Heal to 20%



None.

Oct 11 2007, 1:24 am Akar Post #3



great... lets load up the triggers with wait times... And DCs are just switches with more than 0 or 1 values.



None.

Oct 11 2007, 2:30 am Moose Post #4

We live in a society.

Essentially, you use them to do anything you would want to use Custom Score for.




Oct 11 2007, 7:39 am AntiSleep Post #5



except display score, for that you have to use an actual score/resource variable.



None.

Oct 12 2007, 1:28 am Jello-Jigglers Post #6



So can anyone show me the exact triggers(like using the trigger bb code or sending me a map with easily understandable dc's)? I just want to get it right :)



None.

Oct 12 2007, 2:33 am fritfrat Post #7



Never use death counters for the reason of "I want to use death counters," but instead use it whenever it would be useful to have a variable. This post I'm quoting was from about a week ago, but the thread was filled with spam, so I just quoted myself. It's really just a matter of using some triggers to add, subtract, or set a variable and then using other triggers with atleast, atmost, and exactly as conditions. The uses for that action and condition are as open as your imagination is, but the simplest is definitely just adding 1 every trigger tick to create a timer with atleast 40 or something like that.

Quote from fritfrat(U)
Switches and death counters are basically just a way to use variables in organizing and linking your triggers. Even though some people do use them more often than they should and waste time on it, most of the time it would be a heck of a lot more work or even impossible to create trigger systems without using variables of some sort (which is usually either deaths because it works out so great or switches because you can randomize them). You could have a working, bug-free map without using death counters, switches, or any other type of variable, but you would just be far more limited in what you could do. For example... without using variables (death counters), you would have to have all of the pre-reqs for a trigger all be able to fit into those Conditions for that trigger, which is limited to being owned by 1 player. With death counters, you can have all different types of conditions add or subtract a certain amount to a death counter, resulting in an action based on all these other conditions. Another example would be that with hyper triggers, you are limited to only running one Wait action at a time; people use death counters by adding 1 every trigger cycle so they can utilize multiple waits at the same time. There really are lots more uses for death counters or switches, but just take my word for it that it's definitely necessary to use variables when creating more complex trigger systems :)




None.

Oct 12 2007, 2:44 am Akar Post #8



Here, lemme make you an example map.

EDIT:
Here.

Attachments:
Example - Death Counters.scm
Hits: 2 Size: 39.84kb

Post has been edited 2 time(s), last time on Oct 12 2007, 3:04 am by Akar. Reason: Forgot Map :P



None.

Oct 12 2007, 4:01 am Roy Post #9

An artist's depiction of an Extended Unit Death

Ah, I made a map explaining how to use death counters. I used it as switches.

Unfortunately, it's also a tutorial on how to make a bound (Lol) but you should be able to learn at least how to use death counters as switches... Or how to make bounds!!!111111 :P




Oct 12 2007, 4:13 am Jello-Jigglers Post #10



Thanks all. :) Maybe this would be a good topic to sticky?(when we actually have mods lol! :P)



None.

Oct 14 2007, 10:57 pm Falkoner Post #11



http://Falkoner.CoW.GooglePages.com/Death_Counts.html

Just my tutorial on it.

They are useful since there is somewhere around 14,000 possible deaths that could be used, allowing for pretty much limitless variables, they do not use up strings, like switches, they do not cause blocks, like waits, and they do not lag whatsoever.



None.

Oct 14 2007, 11:44 pm Moose Post #12

We live in a society.

Switches only use up strings if you rename them.




Oct 15 2007, 4:46 am JaBoK Post #13



Three things. I never rename switches, why? It's called a piece of paper, a pen, and the numbers one through 256.

Second thing, you can use one deathcounter as infinite switches as long as one is never set without the other. In my map I used a death counter as the weapon you're carrying, cause it can be referenced as current player and it can have a zillion values. Death counters also make good vHP systems, good ways to keep track of levels and a way to use waits while hypertriggers are going (12 deathcounts per second per trigger that continuously adds them.)

Other thing, death counters can be used in "current player" as switches to drastically reduce triggering time.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[09:24 pm]
Moose -- denis
[05:00 pm]
lil-Inferno -- benis
[10:41 am]
v9bettel -- Nice
[01:39 am]
Ultraviolet -- no u elky skeleton guy, I'll use em better
[10:50 pm]
Vrael -- Ultraviolet
Ultraviolet shouted: How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
hey cut it out I'm getting all the minerals
[2024-4-18. : 10:11 pm]
Ultraviolet -- :P
[2024-4-18. : 10:11 pm]
Ultraviolet -- How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
[2024-4-17. : 11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- if i don't gamble them away first
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
Please log in to shout.


Members Online: jjf28