TheDavenia
Member
Posts: 223
Threads: 38
Joined: Jun 2011
Reputation:
0
|
RE: sigh... a fatal error.. again!
(07-18-2011, 03:35 PM)Ouroboros Wrote: (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.
A little bit to complicated for me i'm just a starter could you add it for me please?
Here's the code or the cabinet:
void unlock_cabinet_metal_9(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("cabinet_metal_9", false, true);
PlaySoundAtEntity("", "unlock_door", "cabinet_metal_9", 0, false);
}
Current Project: Nightmare's End(Project Director, Scripter, boss >:D)
|
|
07-18-2011, 03:42 PM |
|