Frictional Games Forum (read-only)

Full Version: how to open iron maiden?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was wondering what script to use to have the iron maiden ( the coffin thing with nails) to open up automatically after i walk over a collide script..

So when i walk over a collide script the coffin swings open.
AddPropImpulse(blahblahblah)

is the function you are looking for. The iron maiden acts as a swing door, so anything you can do with a door will work on the IM as well.
but wont that move the whole thing? instead of just open the doors?
No, because the rest of the iron maiden is considered to be static by the game. Its like if you checked the "static physics" box in the editor for something. So don't worry, it will only move the doors.
hmm it doesnt open much, only opens a crack.. tell me if this is right please:

AddPropImpulse("iron_maiden_1", 40, 1, -27.25, "world");
Just give it a one-directional push instead of a multi-directional. Give the push in the direction the IM is facing, and if you want it to open quickly, make the number roughly 5000 or so, just to make sure it works. For slower things, you may need to use a timer to repeatedly call a function that gives it a little push every so often.
ok i got it thanksss
no problem