I know I must seem a bit dumb for asking something like this:
How to make a script that JUST generates a random number within the limits provided in a random module, but that it doesn’t use the seed of the random module, so that every time I connect a random module to it I don’t have to edit the script and I could use the same script for as many random modules as I want?

Was that a long centence or what? :smiley:

Anyway, can it be done, and if so, HOW?

shouldn’t you just seed the random number generator with the current system time?

all that you need is a call to do that, but iirc the time module isn’t included with blender, and the only other way I know of to get the system time might be Blender.sys.time(), which isn’t avalible in the standalone player iirc

try this:

n = GameLogic.getRandomFloat() 

Thanks for the command, but I don’t even know what to put into the rest of the script!!!

I’ve never actually played around with random number generation before, but in theory this should work.

g = GameLogic

g.RandomNumber = g.getRandomFloat()

Linked to an always sensor with pulse mode will give you a new random number every frame. You can then use the g.RandomNumber variable in any script in any scene.

Not a perfect method (scripts running on the same frame will have the same number), but a simple one to set up.

No, that won’t do. I must have different numbers! Thanks anyway, but how do I get that to change the value of a property?

I’m a dummy, someone please write me a whole script with explanation! :frowning:

I recommend you learn the basics of python before attempting anything like this.

To use the random number to alter a variable, you’d need some conditions:

if g.RND > 0.2 and g.RND < 0.5:

    o.Test = 1

elif g.RND > 0.6 and g.RND < 0.7:

    o.Test = 2


    o.Test = 3