(07-18-2011, 03:04 PM)TheDavenia Wrote: Thanks guys
(07-18-2011, 02:40 PM)Roenlond Wrote: You need three columns for setswingdoorlocked, not just two. Add a true/false to each of them if you wish to use effects when it happens.
I got one more question what do i got to add as a function that if i unlock the closet the doors fly open and a scream sound or something plays?
You have to do something like
SetSwingDoorAutoCloseDisable(closet name, true);
SetSwingDoorClosed(closet name, false, true);
And then you have to find out the body name of the closet type you're using and use
//for metal closets/cabinets
AddBodyForce("metal_cabinet_1_rightDoor", 0, 0, 0, "world");
AddBodyForce("metal_cabinet_1_leftDoor", 0, 0, 0, "world");
This link will take you to a wiki page I made actually just a little bit ago about it. The three 0s are the directions to add the force, so if it opened toward -Z, it would be 0, 0, -900.
First zero is X, second is Y, and the third is Z.