Staredit Network

Staredit Network -> UMS Assistance -> Dectecting Equal Death Counters
Report, edit, etc...Posted by bearcat_fan on 2006-03-14 at 16:51:54
I hope this question makes sense and I am not sure if this should go in this section or in concepts but here goes cause I want to make a map that would need this. So say I want to have each player enter a code which translates into a death counter. There are three numbers that are digits 1-9. By selecting a number, it then adds to a death counter. Here is a visual:

Code is 3 numbers:

Digits: (1 2 3 4 5 6 7 8 9)
Code #1: 1 2 3 4 5 6 7 8 9
Code #2: 10 20 30 40 50 60 70 80 90
Code #3: 100 200 300 400 500 600 700 800 900

So if you choose the number 3 - 4 - 7 then it adds 3 + 40 + 700 = 743

If I wanted each player to have a unique code, is there a way to easily detect a copy without 400000 triggers? I know staredit doesnt have a direct way to compare two numbers which can be annoying. Any is appreciated, thanks.

-bearcat_fan
Report, edit, etc...Posted by The_Shattered_moose on 2006-03-14 at 18:00:54
Unless I am mistaken, you want to be able to see if death counter values are equal, right? If not, ignore this, as this is a system to compare death count values
You can compare death counters by having a trigger like this:
Conditions:
Player has suffered at least 1 deaths of " value a"
Player has suffered at least 1 deaths of " value b"
Other conditions you might want
Actions:
Subtract 1 death of "value a"
Subtract 1 death of "value b"
add 1 death of "value a remember"
add 1 death of "value b remember"
add 1 death of "pairs"
Preserve trigger

Then have two other triggers like this:
Conditions:
Player has suffered exactly 0 deaths of " value a"
Player has suffered at least 1 deaths of " value b"
Player has suffered at least 1 death of "pairs" (Technically unnescesarry, just there as insurance that the trigger fires at the right time)
actions:
Whatever actions you want to occur if the values arn't equal

Conditions:
Player has suffered at least 1 deaths of " value a"
Player has suffered exactly 0 deaths of " value b"
Player has suffered at least 1 death of "pairs" (Technically unnescesarry, just there as insurance that the trigger fires at the right time)
actions:
Whatever actions you want to occur if the values arn't equal

Then have two triggers like this to reset the values to their origionals
Conditions:
Comparison cycle completed
Player has suffered at least 1 deaths of "value a remember"
Actions:
subtract 1 death for "value a remember"
add 1 death for "value a"
preserve trigger

Conditions:
Comparison cycle completed
Player has suffered at least 1 deaths of "value b remember"
Actions:
subtract 1 death for "value b remember"
add 1 death for "value b"
preserve trigger
The system is slightly complex, but should fufill any death count comparing needs.
Report, edit, etc...Posted by bearcat_fan on 2006-03-14 at 18:29:19
Haha, yeah I was thinking of the same system once I started putting thoughts to paper and I hoped it might work, but I couldn't post before you got to it to ask. Thanks! I want to make an RPG with a save feature and want to make it so people have to have a unique player code to put in a password. Thanks again,

bearcat
Report, edit, etc...Posted by Rantent on 2006-03-14 at 19:54:37
Except you wouldn't want to subtract the deaths one at a time if you want it to be fast.
I'd do it in a 1,2,4,8,16,32 system. Where it would subtract if both had one of those numbers. And then add them back the same way. It would make it faster than doing it by 1's.
Report, edit, etc...Posted by MapUnprotector on 2006-03-16 at 00:53:57
What you are using is a binary countoff if you go by powers of 2. The concept is part of Counter Arithmetic. There's a tutorial on it.
Report, edit, etc...Posted by nimadude on 2006-03-16 at 01:59:08
QUOTE(bearcat_fan @ Mar 14 2006, 03:28 PM)
Haha, yeah I was thinking of the same system once I started putting thoughts to paper and I hoped it might work, but I couldn't post before you got to it to ask.  Thanks!  I want to make an RPG with a save feature and want to make it so people have to have a unique player code to put in a password.  Thanks again,

bearcat
[right][snapback]445592[/snapback][/right]


How would this work? How would it remember their progress?
Report, edit, etc...Posted by HeRtZ on 2006-03-16 at 02:24:08
All i know is 12 death counters with hypers is 1000 milliseconds. tongue.gif
Report, edit, etc...Posted by ZPD on 2006-03-16 at 16:13:20
This map shows you how the concepts in the tutorial work.
Next Page (1)