Add objects of random size?


I’m making a game, and using the Edit Object actuator to add several copies of the same object. I was wondering if there was a way to add them with random sizes, between two extremes. (I don’t want it to be huge, and I don’t want it to be microscopic)

Any ideas?


Yea, there are local scale setters on the game object. So, when you add it, get that object, and then set the appropriate scale (the physics mesh seems to re-instance automatically).

I’ve made a small example for you (attached). I hope it helps:


rand_spheres.blend (135 KB)

Ahh. Thanks man, this looks promising.

Hm… It works great. My only problem is that the first object is always the same size. My idea was to put several empties who would all add one object at the beginning of the game. Unfortunetly, they would all still be the same size…

You should be getting different sizes …

Post a simple .blend that shows this behavior, and I’ll try to figure out what’s going on (although, this could be a systems issue - what os are you using?).

Its ok. I just added a random seed Sensor, and now it works. Everything is working fine. Thx.