I'm trying to set up a scene using a script that places a bunch of cubes in random locations throughout the screen and sets their physics type to rigid body. Ideally, I'd like to have one cube be an agent whose actions can be controlled via a different script. How do I set objects' physics type en masse using python in the game engine? I've tried
ActiveObj.game.physics_type = 'RIGID_BODY' ActiveObj.game.use_collision_bounds = 1
as well as
for obj in bpy.data.objects: bpy.ops.rigidbody.object_add(type='ACTIVE')
but, obviously, neither works in the game engine. How do I get around this?