I know some of you are interested in more information about randomization elements in starcraft map making, so here I go. Randomization in map making is all about making many actions possible for 1 condition, and you need an unique combinaison to trigger every of these possibilities. Ok, this sentence might not be the easiest to understand, and I also know that I sometime sucks at explaining what I have in my head.. so here's an example. I have a civilian and a beacon, when I move the civilian on the beacon I want either a marine or a firebat to spawn at location X. That makes 2 possibilities (marine and firebat). Suppose I want both marine and firebat to spawn equaly, (50% of the time), I'll need two actions, one to create marines and one to create firebats and you want the marine one to run 50% of the time and the firebat one the other 50% of the time. how do I randomize it? With Switches! You can randomize a switch so you get either "set" or "disabled" that gives 2 possibilities and that's exactly what we need right now.. so what you want to do is to keep your switch randomized all the time and when the civilian goes over the beacon, the result will depend if the switch is "set" or "disabled" First you need a trigger like this: Code: Condition: - Always Action: - Randomize Switch 1 - Preserve trigger Note: You might need more than one switch to be randomized. Note: You want this trigger to be placed after the triggers that will spawn your units, I'll say more about this later. Now, you actualy want to spawn a marine or a firebat so here's what you want to spawn them: Code: Condition: - Player brings the civilian over the beacon. - Switch 1 is "set". Action: - Create 1 Marine at Location X - Move/Remove/Kill/Whatever the civilian on the beacon (To make sure the trigger doesn't run twice) - Preserve Trigger and of course, you need one to make firebats.. Code: Condition: - Player brings the civilian over the beacon. - Switch 1 is "disabled". Action: - Create 1 Firebat at Location X - Move/Remove/Kill/Whatever the civilian on the beacon (To make sure the trigger doesn't run twice) - Preserve Trigger There you go, you get a 50/50 (1:1 ratio) chance of getting a firebat or a marine... Now what if you want 75% chance of getting a marine?? 75/25 (3:1) that gives 3 possibilities that should spawn a marine and 1 that should spawn the firebat. That means you will need more switch that are going to be randomized, add Switch 2 to the "randomize" trigger I said earlier to make it 4 possibilities instead of 2, and that's what we need. Now you gotta know what those 4 possibilities are.. First possibility: Switch 1: set Switch 2: set Second possibility: Switch 1: disable Switch 2: disable Third possibility: Switch 1: disable Switch 2: set Fourth possibility: Switch 1: set Switch 2: disable I usualy label these like this: 11 00 01 10 where 1 = set and 0 = disable With more switches you get more possibilities, which means the possibilities are ENDLESS! 3 switches = 8 possibilities 4 switches = 16 possibilities etc. Code: How to calculate how many possibilities there are with your switches: This applies to everything, not only starcraft. Every starcraft switches has 2 possibilities (set, disabled) You take that number (2) and make it exponant the number of switches (or w/e) you got (This is a request to someone smart: understand what I tried to write, and tell me how to write it with good english because I HAVE NO FRIGGEN IDEA!) ex: 2² if you have 2 switches. (2² = 4 possibilities) 2³ if you have 3 switches. (2³ = 8 possibilities) etc. Again, this also work with other kind of stuff, like.. numbers, letters or w/e... ex: How many possibilities of group of 3 letters there is? (aaa, aab, aac, aad, aae ... zzx, zzy, zzz) 3^26 = the answer to the question above. Ok, Back to starcraft now. So, now that we have 2 switches giving 4 possibilities, you need the 4 actions dealing with them. here I go: Code: Condition: - Player brings the civilian over the beacon. - Switch 1 is "set". - Switch 2 is "set". Action: - Create 1 Marine at Location X - Move/Remove/Kill/Whatever the civilian on the beacon (To make sure the trigger doesn't run twice) - Preserve Trigger Code: Condition: - Player brings the civilian over the beacon. - Switch 1 is "disabled". - Switch 2 is "disabled". Action: - Create 1 Marine at Location X - Move/Remove/Kill/Whatever the civilian on the beacon (To make sure the trigger doesn't run twice) - Preserve Trigger Code: Condition: - Player brings the civilian over the beacon. - Switch 1 is "disabled". - Switch 2 is "set". Action: - Create 1 Marine at Location X - Move/Remove/Kill/Whatever the civilian on the beacon (To make sure the trigger doesn't run twice) - Preserve Trigger Code: Condition: - Player brings the civilian over the beacon. - Switch 1 is "set". - Switch 2 is "disabled". Action: - Create 1 Firebat at Location X - Move/Remove/Kill/Whatever the civilian on the beacon (To make sure the trigger doesn't run twice) - Preserve Trigger That gives a 3:1 ratio for marine:firebat. Of course these 4 triggers could be used to spawn Marines, Firebats, Medic and Ghosts in a 1:1:1:1 ratio too.. you could even tweak it with more switches to get some weird "balanced" (depending of the map) ratio, something like 8:4:2:1, Giving much more marines than ghosts. with randomized switches, the possibilities are endless and they often add a lot of playability to the map, so why not starting using them now? Good luck and have fun, feel free to ask any questions about randomization here.
holy shiznit, i feel like a dumb*ss. i totally never noticed the "random" choice in the set switch action. wow! thanks a lot!
It's pretty much the only mathetically trustable way to randomize stuff.. The other way would be to make some units move on the map (either make them walk or move them with triggers) and base your other triggers on them.. but it's much harder, takes more time and is less trusty.