Staredit Network

Staredit Network -> UMS Assistance -> random outcomes
Report, edit, etc...Posted by Ahli on 2006-10-09 at 10:46:18
I need a system, that gives me after 1 trigger-action turn a random status.
I need for example after 1 trigger turn (every trigger is checkd 1 time) 1 out of 3 possibilitys.

=> With switches u always have 2/4/8/16/32/... possibilitys.

>>>> But I need 3 equal possibilitys and 5;6;7... <<<<<
after every trigger checking...

I have hypertriggers and I need the speed cause I'm mapping a fast shooter with virtual accuracy. So I need it after 1 trigger-check-action...

thumbup.gif I know u will find a solution.... happy.gif
Report, edit, etc...Posted by Mini Moose 2707 on 2006-10-09 at 11:01:38
You can have four possibilities: 1, 2, 3, repeat check... but that isn't going to cut it for every trigger cycle.
Report, edit, etc...Posted by Ahli on 2006-10-09 at 11:14:25
I know that. But I need exactly after every trigger-cycle 1 out of 3 posibilitys and they should be random.
Report, edit, etc...Posted by (U)Bolt_Head on 2006-10-09 at 11:29:43
So you want random with 3, And to have no chance of rerandiminzation.

Conditions:
- Always
Actions:
- Add one death to 'unitA'
- Randomize Switch 1
- Preserve Trigger

Conditions:
- Switch 1 is set
Actions:
- Add one death to 'unitA'
-Preserve Trigger

Conditions:
- PlazyerX suffers at most 4 deaths of 'unitA'
Actions:
- Set deaths to 1 for 'unitA'
- Preserve Trigger

Conditions"
- Whatever triggers your random
- deaths for 'unitA' are exactly 1 (2 or 3)
Actions:
- Random Stuff



Now you can do this if you must have it without rerandomization. There are a few negitive problems
1. It is rather predictable if done every trigger cycle
2. Possablity 1 has a higher chance than 2 or 3. If you want to fix this add a trigger that if there are 5 deaths set them to 2 not 1.

Note: if your using higher non power randomizations you may want to add more switches to randomly add larger numbers too.
Report, edit, etc...Posted by JaFF on 2006-10-09 at 13:38:39
You have a deathcounter going like 1,2,3,1,2,3,1,2,3,1... all the time.
When you need to randomize what you need, you simply randomize 2 switches, and look at the outcomes:

Outcome 1: 0,0
Outcome 2: 0,1
Outcome 3: 1,0
Outcome 4: 1,1

If outcomes 1, 2 or 3 happen, you simply do your actions. If outcome 4 happens, you do the same actions depending on your deathcounter status. (1,2 or 3)
Report, edit, etc...Posted by Ahli on 2006-10-09 at 14:39:02
that's a solution i can use. thx jammed! clapping.gif
if u have other solutions for this, post them...
rockon.gif
Report, edit, etc...Posted by JaFF on 2006-10-09 at 14:59:39
Of course, that solution works only if you DON'T NEED to randomise it EVERY trigger cycle, because otherwise it won't be so random.
Report, edit, etc...Posted by PCFredZ on 2006-10-09 at 16:04:51
Using the extra randomization possibilities as "Reroll" is the easiest way possible, I don't know why you don't want to use it.
Report, edit, etc...Posted by DT_Battlekruser on 2006-10-09 at 22:23:38
QUOTE(Jammed @ Oct 9 2006, 11:59 AM)
Of course, that solution works only if you DON'T NEED to randomise it EVERY trigger cycle, because otherwise it won't be so random.
[right][snapback]573755[/snapback][/right]


Because the probability of getting choice number 4 itself is already random, the system is random enough.

QUOTE(PCFredZ @ Oct 9 2006, 01:04 PM)
Using the extra randomization possibilities as "Reroll" is the easiest way possible, I don't know why you don't want to use it.
[right][snapback]573776[/snapback][/right]


He needs it so that it can pick a random one of 3 every trigger cycle. Re-rolling in the next cycle doesn't cut it, and re-rolling in the same cycle leaves a chance of the trigger breaking going as (1/4)[sup]n[/sup] for n repeats.
Report, edit, etc...Posted by DevliN on 2006-10-10 at 12:33:31
I always figured using the fourth possibility as a re-randomizing trigger was the easiest as well.

00 - Possibility 1
01 - Possibility 2
10 - Possibility 3
11 - Randomize 0 and 1 again.

Even if it hits "11" like four times in a row, it will be so fast that no one would even notice anyway (I have 2 "re-roll" outcomes in my Monopoly map and I have never noticed when it re-randomizes them).
Report, edit, etc...Posted by Ahli on 2006-10-10 at 15:58:01
i need that for a war game with virtual hp and accuracy with reloading time and weapon shots cooldown. so if i re-randomize it, it will be like a no hit or no shot.
but the enemy can shoot while u have this "lag".
so i needed a solution where u have only 3 possibilitys after the trigger turn...
Report, edit, etc...Posted by DevliN on 2006-10-10 at 16:02:45
I guess what I'm saying is that the randomization isn't cleared until one of the first three options are chosen. So it will re-randomize instantly and you wont even notice it. Thus, there will be no "lag."
Report, edit, etc...Posted by PCFredZ on 2006-10-10 at 18:31:43
Ok, I have a solution for the 1/3 "perfect" goal without weighted choices... kinda.

Randomize a lot more switches than you need. In your case, randomize, say, 4 switches. Out of the 16 possible choices, make 5 of them result in action "A", 5 of them "B", then 6 "C".

Or randomize 5 switches and go 10-11-11. Or randomize 6 and go 21-21-22.

As you can see, the possibilities are still weighted, but by using more switches, the difference will be negligible.
Report, edit, etc...Posted by Falkoner on 2006-10-10 at 18:47:29
If he used the extra switch combo to reroll there wouldn't be any lag since he is already using hypers
Report, edit, etc...Posted by DT_Battlekruser on 2006-10-10 at 19:06:35
QUOTE(Jammed @ Oct 9 2006, 10:38 AM)
You have a deathcounter going like 1,2,3,1,2,3,1,2,3,1... all the time.
When you need to randomize what you need, you simply randomize 2 switches, and look at the outcomes:

Outcome 1: 0,0
Outcome 2: 0,1
Outcome 3: 1,0
Outcome 4: 1,1

If outcomes 1, 2 or 3 happen, you simply do your actions. If outcome 4 happens, you do the same actions depending on your deathcounter status. (1,2 or 3)
[right][snapback]573704[/snapback][/right]


Jammed has a very simple and quite workable system right here.

Have a running deathcounter going 1-2-3 in the background, and have 00 choice 1, 01 choice 2, 10 choice 3, and 11 deathcounter value.

Note to others: a reroll on another trigger cycle withh be delayed by 84 milliseconds; hypertriggers are not instant.
Report, edit, etc...Posted by DevliN on 2006-10-10 at 19:14:33
True, but I'd hardly consider those 84 miliseconds to be "lag." You wouldn't even notice the rerandomization since its what, about 1/10 of a second?
Report, edit, etc...Posted by Zeratul_101 on 2006-10-10 at 19:25:58
1/12 actually, but its the possiblity that it might take more than two cycles before getting a proper result, and he wants an as fast as possible system. i like jammed's the best, followed by PCFredZ.
Report, edit, etc...Posted by Kenoli on 2006-10-11 at 03:09:04
I'd just randomize a counter in a high range, like 1-1024, then make three almost equal outcomes based on it.
Like anything 1-341 is outcome #1, 342-682 is outcome #2, and 683-1024 is outcome #3.
Report, edit, etc...Posted by (U)Bolt_Head on 2006-10-11 at 11:10:28
QUOTE(Falkoner @ Oct 10 2006, 05:47 PM)
If he used the extra switch combo to reroll there wouldn't be any lag since he is already using hypers
[right][snapback]574527[/snapback][/right]


I like what Devlin said, and in addition to that you can set it up to rerandomize once so the counter would only have a 1/16th chance of being used. (you can rerandomize once before the end of the trigger cycle if you do it first.) *yeah for trigger order*

Edit. although if you make multiple copies of your rerandomize triggers before the rest then you could rerandomize several times... If you had just 4 copies of it you would only have a 1 out of 1024 chance of not finding a result during that trigger cycle.
Report, edit, etc...Posted by Laser_Dude on 2006-10-11 at 17:38:05
Actually, if you just repeat the trigger numerous times, when it would come to re-randomizing, it will do so automatically in the same run, if outcome is 1-1, re-randomize. Copy that trigger numerous times(each copy quarters chance of another re-run)

If you were to make 10 of the second trigger your chances would be 0.00002% of having to go into the next trigger run (2/10000000).


Trigger
Description:
original trigger(always fires)
Players:
¤ your players
Conditions:
¤ conditions
Actions:
¤ randomize switch 1
¤ randomize switch 2
¤ preserve



Trigger
Description:
trigger 2 (copy this one)
Players:
¤ players
Conditions:
¤ switch 1 is set
¤ switch 2 is set
Actions:
¤ randomize switch 1
¤ randomize switch 2
¤ preserve


after about ten or 20 of those, have your triggers, that do the real doing.

my comp's calculator sucks, here's real data for all those people who want regular data(I'm not the best at scientific notation) the equation is (1/4)^(n+1)
10 of the second trigger: 2.384185791*10^-7
20 of the second trigger 2.27373675*10^-13
30 of the second trigger 2.16840434*10^-19
Report, edit, etc...Posted by PCFredZ on 2006-10-11 at 18:43:59
The whole point of randomization is being random anyway, once you get up to a high enough number like 1024 (10 switches), there won't be a difference. Plus, you can sleep well knowing that there is no "1/4 to the Xth power" chance of failing.
Next Page (1)