random


(gargola) #1

Blender’s random sensor sucks!well,at least i think so,cause it’s supposed that something is less likely to happen if the random number is higher(am i correct?)but the event happens always even if the random number is up to 1000!!! i tried adding higher numbers to the frequency in pulses but it’s of no use…the same problem.anybody knows how to make the random sensor work correctly or another way to make random? :smiley:


(S_W) #2

I always use a random actuator which is called by a mouse movement sensor…perhaps this helps you a bit :wink:


(Pooba) #3

Make sure you change the random thing to int uniform and put a hich number in the “Seed” field. If you have 0 it wont be random.

Hope that helps!

Pooba


(gargola) #4

Pooba:what do you mean by: “change the random thing to int uniform”?

S_W: i don’t know how to do that… :frowning:


(blenderage) #5

yeah, using the random as a sensor it doesnt seem to change anything. to change to int uniform its an option in the random actuator


(gargola) #6

am i blind or dumb? cause i don’t see an int option on the random sensor! :frowning: instead i see a little Inv button…is that what you guys mean?


(gargola) #7

ooooh! now i see what you guys talk about…but my problem is not with actuators…my problem is with the random SENSOR he he! :wink: …what i really want to do is an object to make a move from time to time (random times) not every time like the random sensor does.any ideas? :smiley:


(S_W) #8

Try this file:

http://www.geocities.com/sanderwozniak/random.zip

Perhaps this helps you a bit. :wink:


(Pooba) #9

I’m a bit confused on what the random sensor does. If you replace the random sensor in SW’s example file with an always sensor it does the exact same thing.

Pooba


(S_W) #10

I’m not really sure about that, but I prefer to use a mouse sensor (mouse movement) anyway. Of course this is only useful if you use the mouse in your game, but if you do so it’s the best way I know to get a true random value.


(Pooba) #11

why not just an always sensor?

Pooba


(S_W) #12

Yes, you are right, why not. I’m sure it will work the same way :wink:


(gargola) #13

what the heck is wrong with geocities? it says that page was not found! :frowning:


(gargola) #14

exactly! that’s what i’m complaining about…that is not random,that’s always!if random is like that on blender,why use it?..i instead would use always. :-?


(gargola) #15

ok guys…i came up with something to make the random i wanted(well,sort of).now i got another question: is it possible to make an object appear as long as you keep a button pressed?then when you release it the object disappears.anybody? :smiley:


(wiseman303) #16

Sure, use a second keyboard sensor with the same key, and set the ‘inv’ button.


(gargola) #17

Thanx wise!!! :smiley:


(blendedHKU) #18

I believe a random sensor just sends a true or false pulse everytime it’s triggered.
By changing the f: button, you can set the time when a sensor is triggered.

Maybe what you need is to generate a random number (from 1 to 50 or something) with the random actuator,and store this in a property, then you don’t need to use the random sensor, but you can use a property sensor.

If you use a property sensor and set it to equals 1, then you have a chance of 1 in 50 that this sensor is going to pass a positive pulse, and you can set this sensor to always (f:0).
This is a big difference with the random sensor which gives you a chance of 1 out of 2 (50%).

Jasper


(gargola) #19

blendedHKU: thanx for the info! :smiley: