Delay Game Engine Pysics?

I am working on a movie using the blender game engine. In one scene there are a lot of things being destroyed: e.g. houses and stuff. I am using the game engine physics along with the cracker script to achieve the effects. However, all of the buildings fall at the same time when i press “p.” Is there a way to delay it so i can have them all happen at different times?

You could freeze their dynamic at the start up and re-enable it when needed.

Don’t start the game engine with moving objects being static though, if the object get loaded up as static (or an no-physic option) it will remain this way no matter how hard you press the “enable dynamic” button.

How do you do this?

You can do that with an edit object actuator.

You can also code it manually in python.

Both options will work just fine.

I am new to the games engine, so is there a tutorial somewhere?

There’s a whole bunch here

http://www.tutorialsforblender3d.com/

Thanks, however the tutorial for object acuators was a little confusing. Does anyone know of a better one?

i’m not an expert but to freeze and resume your simulations do this:

  • select your physic object and go to logic (F4)
  • add a “Always” sensor and a “AND” controller
  • add an actuator and set its type to “edit object”, subtype to “Dynamics” and action to “Suspend dynamics”
  • wire em and your simulation will be freezed in the first frame.

to resume it you can create a “Delay” sensor and set delay value (read the field tooltip, the yellow box when you pass your mouse over it)
then add a new “AND” controller and “Edit object” / “Dynamics” actuator and set it to resume, wire and go

hope it helps.

Well, you can take a look at this simple file. Sometimes the best tutorial is looking at an example file.

Attachments

SuspendDynamicsExample.blend (44.8 KB)

Thanks Aralmo it worked