Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
sigh... a fatal error.. again!
Author Message
Ouroboros Offline
Junior Member

Posts: 20
Joined: Jul 2011
Reputation: 0
Post: #11
RE: sigh... a fatal error.. again!
It would be more complicated for me to add it for you since I can't see and move things on your map. All you have to do is move the closet in the direction it opens, and see if the X or Z coordinate increases or decreases. If the X coordinate increases, use

AddBodyForce("metal_cabinet_1_rightDoor", 900, 0, 0, "world");
AddBodyForce("metal_cabinet_1_leftDoor", 900, 0, 0, "world");

And that will push the doors open. If the X coordinate decreases, add - in front of the 900. And if the Z coordinate changes, you do the same but it's in the third number section.

AddBodyForce("metal_cabinet_1_rightDoor", 0, 0, 900, "world");
AddBodyForce("metal_cabinet_1_leftDoor", 0, 0, 900, "world");

And then you just add the SetSwingDoorAutoCloseDisable("name", true);
And SetSwingDoorClosed("name", false, true); before the AddBodyForce code.
07-18-2011 03:49 PM
Find all posts by this user Quote this message in a reply
TheDavenia Offline
Member

Posts: 223
Joined: Jun 2011
Reputation: 0
Post: #12
RE: sigh... a fatal error.. again!
(07-18-2011 03:49 PM)Ouroboros Wrote:  It would be more complicated for me to add it for you since I can't see and move things on your map. All you have to do is move the closet in the direction it opens, and see if the X or Z coordinate increases or decreases. If the X coordinate increases, use

AddBodyForce("metal_cabinet_1_rightDoor", 900, 0, 0, "world");
AddBodyForce("metal_cabinet_1_leftDoor", 900, 0, 0, "world");

And that will push the doors open. If the X coordinate decreases, add - in front of the 900. And if the Z coordinate changes, you do the same but it's in the third number section.

AddBodyForce("metal_cabinet_1_rightDoor", 0, 0, 900, "world");
AddBodyForce("metal_cabinet_1_leftDoor", 0, 0, 900, "world");

And then you just add the SetSwingDoorAutoCloseDisable("name", true);
And SetSwingDoorClosed("name", false, true); before the AddBodyForce code.

How am i supposed to see if it opens in x or z or y Huh

Current Project: Nightmare's End(Project Director, Scripter, boss >:D)
07-18-2011 05:16 PM
Find all posts by this user Quote this message in a reply
Ouroboros Offline
Junior Member

Posts: 20
Joined: Jul 2011
Reputation: 0
Post: #13
RE: sigh... a fatal error.. again!
A cabinet will open in the direction the doors face. So, in the level editor select the cabinet you want to open and move the camera so that the side with the doors faces you. Then, move it toward you slightly and watch it's coordinates to see which one increases/decreases.
Afterward you just move it back or use Ctrl + Z.



.jpg  Capture.jpg (Size: 434.34 KB / Downloads: 11)
.jpg  Capture2.jpg (Size: 434.08 KB / Downloads: 10)
07-18-2011 07:49 PM
Find all posts by this user Quote this message in a reply
TheDavenia Offline
Member

Posts: 223
Joined: Jun 2011
Reputation: 0
Post: #14
RE: sigh... a fatal error.. again!
(07-18-2011 07:49 PM)Ouroboros Wrote:  A cabinet will open in the direction the doors face. So, in the level editor select the cabinet you want to open and move the camera so that the side with the doors faces you. Then, move it toward you slightly and watch it's coordinates to see which one increases/decreases.
Afterward you just move it back or use Ctrl + Z.

I tried it but it doesn't work?
When i unlock it it doesn't fly open?

Current Project: Nightmare's End(Project Director, Scripter, boss >:D)
07-18-2011 09:44 PM
Find all posts by this user Quote this message in a reply
Ouroboros Offline
Junior Member

Posts: 20
Joined: Jul 2011
Reputation: 0
Post: #15
RE: sigh... a fatal error.. again!
(07-18-2011 09:44 PM)TheDavenia Wrote:  
(07-18-2011 07:49 PM)Ouroboros Wrote:  A cabinet will open in the direction the doors face. So, in the level editor select the cabinet you want to open and move the camera so that the side with the doors faces you. Then, move it toward you slightly and watch it's coordinates to see which one increases/decreases.
Afterward you just move it back or use Ctrl + Z.

I tried it but it doesn't work?
When i unlock it it doesn't fly open?
When I was trying to figure out how to do it, I found a post by someone and they said to make a box and play with it, push it around and such. So, I suggest making a small box and playing with AddPropForce and try to learn how to move it the way you want, then play around more with the cabinet doors. If you can get the box to move where you want it too, AddBodyForce works the same way and you'd just need to add the body name (for metal cabinets add _leftDoor or _rightDoor at the end of the entity name in the code).
07-19-2011 04:24 AM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: