Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
sigh... a fatal error.. again!
TheDavenia Offline
Member

Posts: 223
Threads: 38
Joined: Jun 2011
Reputation: 0
#10
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
Find


Messages In This Thread
sigh... a fatal error.. again! - by TheDavenia - 07-18-2011, 02:07 PM
RE: sigh... a fatal error.. again! - by Kyle - 07-18-2011, 02:12 PM
RE: sigh... a fatal error.. again! - by Ouroboros - 07-18-2011, 02:23 PM
RE: sigh... a fatal error.. again! - by Roenlond - 07-18-2011, 02:40 PM
RE: sigh... a fatal error.. again! - by Ouroboros - 07-18-2011, 02:41 PM
RE: sigh... a fatal error.. again! - by Ouroboros - 07-18-2011, 03:35 PM
RE: sigh... a fatal error.. again! - by TheDavenia - 07-18-2011, 03:42 PM
RE: sigh... a fatal error.. again! - by Ouroboros - 07-18-2011, 03:49 PM
RE: sigh... a fatal error.. again! - by Ouroboros - 07-18-2011, 07:49 PM
RE: sigh... a fatal error.. again! - by Ouroboros - 07-19-2011, 04:24 AM



Users browsing this thread: 1 Guest(s)