| Blockland Forums > Help |
| VCE Randomization Help? |
| (1/1) |
| Zalot:
I was wondering how I could randomly teleport a player to 1 of 3 locations via Variable Conditional Events? I know you can get a 1/# chance, and this is nice for "Did you get it or not", but it isn't very helpful for "Where did you go?". With only onVariableTrue and onVariableFalse, how would I make more than 2 options? |
| Zalot:
Sorry if I'm a bit vague. I want it to be so that when a player touches a brick, they are randomly teleported to one of 3 different locations. |
| phflack:
0 input>self>vce_modvariable[brick][random][set][1] 1 input>self>vce_modvariable[brick][random][randomnum][3] 2 input>self>vce_ifvariable[random][==][1][3 4] 3 onvariabletrue>teleport to 1 4 onvariablefalse>self>vce_ifvariable[random][==][2][5 6] 5 onvariabletrue>teleport to 2 6 onvariablefalse>teleport to 3 getting a random number works by setting to the lower limit, then randoming up to the higher limit checking more than a boolean is done either by A. checking if it's the first value, if true do stuff, if false check for the second value and so on (if A do stuff, if not A check if B do stuff, if not check C do stuff..) or B. checking each individualy (if A do stuff, if B do stuff, if C do stuff..) |
| Navigation |
| Message Index |