Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: [SOLVED] Randomized Selections.
[SOLVED] Randomized Selections.
Jun 20 2011, 7:40 pm
By: Psynergy  

Jun 20 2011, 7:40 pm Psynergy Post #1



I'm trying to set up a system where say I have 1-6 Variables to pick from, So say the player fill the condition of a trigger, I want the game to pick from 1-6 Variables(Not at same time just pick one of the 6 options) as a response to the player fulfilling the trigger conditions.

Anyone know how I can get around to setting this up?

Post has been edited 1 time(s), last time on Jun 22 2011, 5:09 pm by Psynergy.



None.

Jun 20 2011, 8:08 pm Ahli Post #2

I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

http://www.staredit.net/?p=oldwiki&s=66

You will have option 7 and 8 possible during the computation. You might just try it again in the next trigger cycle (-> do not falsify the random output conditions).




Jun 20 2011, 8:18 pm rockz Post #3

ᴄʜᴇᴇsᴇ ɪᴛ!

Another way to speed up the process if it doesn't happen instantly is to pre-calculate the result.

Randomize the 3 switches whenever DC "Randomize" is 1.
if the DC you store it is 6 or 7, redo it (don't set any DC)
If the DC is 0-5, set DC "randomize" to 0.
Then, when you call the random number, do the action, then reset the "randomize" for the next time you'll use it.

It should be instantaneous unless you run the trigger constantly.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Jun 20 2011, 8:26 pm Psynergy Post #4



Thank you Alhi And Rockz, Very helpful information :).



None.

Jun 20 2011, 9:26 pm JaFF Post #5



You can also generate a random number from 1 to, say, 1024 and then divide the result into 6 segments as equally as you can.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[05:17 am]
NudeRaider -- despite all its flaws the sound design its fantastic
[10:29 pm]
Oh_Man -- homeworld 3 = massive disappointment
[10:05 am]
Moose -- ya
[2024-5-14. : 5:23 am]
zsnakezz -- yes
[2024-5-12. : 8:51 pm]
l)ark_ssj9kevin -- Are you excited for Homeworld 3?
[2024-5-12. : 8:44 pm]
l)ark_ssj9kevin -- Hi Brusilov
[2024-5-12. : 4:35 pm]
O)FaRTy1billion[MM] -- Brusilov
Brusilov shouted: Hey, what happened to EUDDB? Is there a mirror for it somewhere? Need to do a little research.
my server that was hosting it died
[2024-5-10. : 8:46 pm]
NudeRaider -- Brusilov
Brusilov shouted: Hey, what happened to EUDDB? Is there a mirror for it somewhere? Need to do a little research.
https://armoha.github.io/eud-book/
[2024-5-10. : 8:36 am]
Brusilov -- Hey, what happened to EUDDB? Is there a mirror for it somewhere? Need to do a little research.
[2024-5-09. : 11:31 pm]
Vrael -- :wob:
Please log in to shout.


Members Online: Ultraviolet, NudeRaider