Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Switch Combinations
Switch Combinations
Jun 15 2008, 4:12 am
By: Open.14  

Jun 15 2008, 4:12 am Open.14 Post #1



Hey... I'm like making a map to where i need randomized triggers... but here is the thing, I need to use 7 or more switchs to be randomized and i was wonderin if anybody could tell me the amount of combinations there are for that. Please, if there is a pattern to how to figure how many possibilities there are in switchs, tell me. [Example, how would you figure out the amount of possibilities in 200 switchs? Do you multiply?]



None.

Jun 15 2008, 4:43 am fritfrat Post #2



for 1 switch, there are 2: set and cleared. For 2 switches, there are 4: SS, SC, CS, CC. For 3 switches, there are 8: CCC, CCS, CSC, CSS, SCC, SCS, SSC, SSS.

That's the pattern. it's 2^x permutations, where x is the number of switches. For 7 switches, there are 128 permutations... for 200 switches, there are 1.6 * 10^60 permutations, which is probably more than the number of atoms on Earth.



None.

Jun 15 2008, 5:19 am Optics Post #3



Yeah, it's simple math. The trick to using every combination is drawing out a list of combinations before making your map. Typically I never use more then 6 switches per map (which is some 40 odd combinations.) If you draw out all the combinations in advance using a simple pattern such as:

-- Switch 1 on

Switch 1 On
2 Off
3 off
4 off

Switch 1 On
2 on
3 off
4 off


Switch 1 On
2 off
3 on
4 off

Something like that you'll make life a lot easier for yourself because when doing your triggers you'll then easily be able to go back in check off each combination as you add them. Remember though that with hyper triggers on so long as you don't have repeating combinations you can only use 1 out of a possible 40 combinations and have nothing to worry about. So long as hyper triggers are on the switches will keep randomizing within milliseconds until they hit a set of combinations that has a trigger set up for them. So you can randomize 6 switches and then just keep doing the combos until you've finished all your triggers. Don't worry about left over combinations, the triggers will keep randomizing the switches until one hits your triggers and this will happen as if no time at all has passed so it'd be no big deal really.



None.

Jun 15 2008, 6:05 am O)FaRTy1billion[MM] Post #4

👻 👾 👽 💪

Uh. You don't need to draw out combinations. It is just binary... And 6 switches is exactly 64 combinations.

Here they all are (0=cleared, 1=set):
000000, 000001, 000010, 000011, 000100, 000101, 000110, 000111, 001000, 001001, 001010, 001011, 001100, 001101, 001110, 001111, 010000, 010001, 010010, 010011, 010100, 010101, 010110, 010111, 011000, 011001, 011010, 011011, 011100, 011101, 011110, 011111, 100000, 100001, 100010, 100011, 100100, 100101, 100110, 100111, 101000, 101001, 101010, 101011, 101100, 101101, 101110, 101111, 110000, 110001, 110010, 110011, 110100, 110101, 110110, 110111, 111000, 111001, 111010, 111011, 111100, 111101, 111110, 111111

And an easier way to do it is like this:
Code
Conditions:
- (Randomization init)
Actions
Set deaths to 0
Randomize switch 1
Randomize switch 2
Randomize switch 3
Randomize switch 4
... (et cetera)

Conditions:
- Switch 1 is set
Actions:
- Add 1 Death

Conditions:
- Switch 2 is set
Actions:
- Add 2 Deaths

Conditions:
- Switch 3 is set
Actions:
- Add 4 Deaths

Conditions:
- Switch 4 is set
Actions:
- Add 8 Deaths

(etc., the deaths added doubling each switch.)


Then to do an action for each randomization, you can do at least and at most for weighted outcomes, or use "exatly" for specific outcomes.
And the way to tell the possible number of outcomes is 2^(number of switches). 7 switches would be 128 possibilities. 200 switches would be about 1.61x1060.

Post has been edited 1 time(s), last time on Jun 15 2008, 6:12 am by FaRTy1billion.



TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

Jun 15 2008, 6:09 am x1101x Post #5



Dude do yourself a favor and use one death count thats constantly counting up until it reaches the number of combinations you need (then it resets to 0). Since it will count 12 per second (hyper triggs on) it will basically be random and will make it so you can have any number of permutations you want instead of those that are just to the power of 2 without having duplicates.



None.

Jun 15 2008, 6:59 am Optics Post #6



Whether you draw them out in binary or not it's still helpful to make sure you've done a trigger for each and every combination. Just personal preference how you draw it out. I was just trying to give the guy some advice that I myself have found helpful when I make maps. No need to act so arrogant about it.



None.

Jun 15 2008, 8:14 am ZzEzZ Post #7



ull have 2 get used 2 that... even when just giving help, sum ppl 'round here get pretty cocky wit it, lol
(dunno y though o.0, i mean... its just SC)



None.

Jun 15 2008, 1:33 pm Open.14 Post #8



Thx all for the help, you really helped me with my map. Now i can make switchs without worrying if i missed one. Thats always helpful. lol.



None.

Jun 15 2008, 1:41 pm Open.14 Post #9



Quote from fritfrat
for 1 switch, there are 2: set and cleared. For 2 switches, there are 4: SS, SC, CS, CC. For 3 switches, there are 8: CCC, CCS, CSC, CSS, SCC, SCS, SSC, SSS.

That's the pattern. it's 2^x permutations, where x is the number of switches. For 7 switches, there are 128 permutations... for 200 switches, there are 1.6 * 10^60 permutations, which is probably more than the number of atoms on Earth.

Not becoming mean or anything but what does the ^ represent then? f 7=128 combos, how'd u figure that out? 7x7=49 not 128. :wtfage:



None.

Jun 15 2008, 1:48 pm Clokr_ Post #10



2^x means 2 to the x AKA 2*2*2*2... x times.
2^7 = 2*2*2*2*2*2*2 = 128



?????

Jun 15 2008, 2:19 pm Open.14 Post #11



Quote from Clokr_
2^x means 2 to the x AKA 2*2*2*2... x times.
2^7 = 2*2*2*2*2*2*2 = 128

Thanks. That helped. :D



None.

Jun 15 2008, 4:10 pm Falkoner Post #12



Yeah, when you get past 4 switches, I would start to use the Single Switch Randomization shown on this tutorial, it provides just as random results and only requires one switch and 2 death counts.



None.

Jun 16 2008, 3:13 am O)FaRTy1billion[MM] Post #13

👻 👾 👽 💪

Quote from Optics
Whether you draw them out in binary or not it's still helpful to make sure you've done a trigger for each and every combination.
The point of listing them in binary is so you don't miss one. It follows a specific counting pattern, so there is no way that you could miss, skip, or duplicate one.



TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

Jun 16 2008, 4:06 am Open.14 Post #14



Yupper Doodles! Farty is rite! He taught me well. *Bows in Respect* lol



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[07:43 am]
NudeRaider -- Vrael
Vrael shouted: if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
Yeah I'm not a big fan of Westernhagen either, Fanta vier much better! But they didn't drop the lyrics that fit the situation. Farty: Ich bin wieder hier; nobody: in meinem Revier; Me: war nie wirklich weg
[2024-4-29. : 6:36 pm]
RIVE -- Nah, I'm still on Orange Box.
[2024-4-29. : 4:36 pm]
Oh_Man -- anyone play Outside the Box yet? it was a fun time
[2024-4-29. : 12:52 pm]
Vrael -- if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
[2024-4-29. : 11:17 am]
Zycorax -- :wob:
[2024-4-27. : 9:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[2024-4-27. : 7:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[2024-4-27. : 6:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
[2024-4-27. : 3:33 pm]
O)FaRTy1billion[MM] -- o sen is back
Please log in to shout.


Members Online: NudeRaider, Roy