I started a new game after completing the marble game and this one you will collect raindrops as an object overhead drops them and must get them before they hit the ground. The problem is getting the drops to be created at random times.
I set up a random actuator to an always sensor and then set a property sensor to an edit object actuator, the problem is is that the always sensor and the random actuator ticks only once, not continually generating a new value for the variable creating the raindrop.
How can I constantly get a new value from the random actuator instead of it generating a value only once?
I don’t know the details of your setup, but I’m pretty sure that you need an always sensor connected to the random actuator in order to supply a continous pulse.
Try int uniform for the setting, set the seed above 0, set the min and max. It doesn’t work on some settings. If the seed is set to zero, it seems to only give one number.
I think he means he wants a new seed each time or something. I did this with python, if a random seed is what you want I’ll explain how I did it.
No, I don’t think so. Put an always sensor on a random actuator and if the seed is set for zero it will keep spewing out the same number over and over.
g = GameLogic
cont = g.getCurrentController()
own = cont.getOwner()
drop = own.getActuator("AddDrop")
x = 25 #Change this to affect timing: approx. 1 drop falls every x frames
r = int(g.getRandomFloat()*x)+1
if r = 1:
g.addActiveActuator(drop,1)