Frictional Games Forum (read-only)
[SCRIPT] Teleporting-Naked-Guy Help - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: [SCRIPT] Teleporting-Naked-Guy Help (/thread-25611.html)

Pages: 1 2 3


RE: Teleporting-Naked-Guy Help - MsHannerBananer - 07-05-2014

(07-05-2014, 12:53 PM)Harry Potter Wrote:
(07-05-2014, 10:25 AM)MsHannerBananer Wrote:
PHP Code:
AddBodyForce("cabinet1_rightDoor"00, -900"world");
AddBodyForce("cabinet1_leftDoor"00, -900"world"); 

So, if you had a cabinet named "cabinet1" you add "_rightdoor" or "_leftdoor". Use both to open both doors, or just one.

That wouldn't work. If you open the model in the ModelEditor, you'll see that the main body and doors are seperate and you only specify the body of the doors, not the names of the doors.

So unless the Body your Right door is named rightDoor and Body of the Left door named leftDoor, your method won't work.
PHP Code:
AddBodyForce("cabinet1_Body_1"00, -900"world");
AddBodyForce("cabinet1_Body_2"00, -900"world"); 

That would work.

If you had read my post correctly, you would have noticed I was talking about the METAL cabinet. You know, cabinet_metal.ent? LOL

The metal cabinet has two bodies for the doors, labelled, as afore mentioned, "rightDoor" and "leftDoor". The use of "_left/rightDoor" attached to the name of your cabinet in your script, directly references the bodies on the cabinet, therefore giving you creative power to blow them open as you see fit.

So for the metal cabinet, yes, this method does work.


RE: Teleporting-Naked-Guy Help - PutraenusAlivius - 07-06-2014

(07-05-2014, 08:13 PM)MsHannerBananer Wrote:
(07-05-2014, 12:53 PM)Harry Potter Wrote:
(07-05-2014, 10:25 AM)MsHannerBananer Wrote:
PHP Code:
AddBodyForce("cabinet1_rightDoor"00, -900"world");
AddBodyForce("cabinet1_leftDoor"00, -900"world"); 

So, if you had a cabinet named "cabinet1" you add "_rightdoor" or "_leftdoor". Use both to open both doors, or just one.

That wouldn't work. If you open the model in the ModelEditor, you'll see that the main body and doors are seperate and you only specify the body of the doors, not the names of the doors.

So unless the Body your Right door is named rightDoor and Body of the Left door named leftDoor, your method won't work.
PHP Code:
AddBodyForce("cabinet1_Body_1"00, -900"world");
AddBodyForce("cabinet1_Body_2"00, -900"world"); 

That would work.

If you had read my post correctly, you would have noticed I was talking about the METAL cabinet. You know, cabinet_metal.ent? LOL

The metal cabinet has two bodies for the doors, labelled, as afore mentioned, "rightDoor" and "leftDoor". The use of "_left/rightDoor" attached to the name of your cabinet in your script, directly references the bodies on the cabinet, therefore giving you creative power to blow them open as you see fit.

So for the metal cabinet, yes, this method does work.

Oh yeah. I missed the word "metal cabinet".


RE: Teleporting-Naked-Guy Help - CQBgamer - 07-08-2014

Code:
SetSwingDoorLocked("cabinet_metal_1", false, true);
    AddBodyForce("cabinet_metal_1_rightDoor", 900, 0, 900, "world");
    AddBodyForce("cabinet_metal_1_leftDoor", 0, 900, 900, "world");

This is the code I have for the door to swing open but nothing happens once I enter the script area, everything else still occurs that is triggered by this area but the doors don't open, any ideas? I have the different axis modifiers in case I was applying force to the wrong one.


RE: Teleporting-Naked-Guy Help - PutraenusAlivius - 07-08-2014

I don't think 900 works for a Force. Unless it's an impulse, the amount of force given must be bigger/the same as 2000.


RE: Teleporting-Naked-Guy Help - CQBgamer - 07-08-2014

Ok, thank you. I'll try that and see if it works.

Nope. Tried 2000 and -2000.


RE: Teleporting-Naked-Guy Help - PutraenusAlivius - 07-08-2014

(07-08-2014, 03:38 AM)CQBgamer Wrote: Ok, thank you. I'll try that and see if it works.

Nope. Tried 2000 and -2000.

Try bigger than that. 10000 or 100000.


RE: Teleporting-Naked-Guy Help - CQBgamer - 07-08-2014

I figured out the problem, the corpse was keeping the doors from opening. One more thing, is there anyway to prevent the hand icon from appearing to interact with certain script areas? It just gets a but annoying when I have the icon to interact with it pop up when the player has no reason to interact with it.


RE: Teleporting-Naked-Guy Help - Mudbill - 07-08-2014

The hand should only appear when you've added a AddPlayerInteractCallback to it, which can be applied directly on the area itself in the editor.


RE: Teleporting-Naked-Guy Help - CQBgamer - 07-08-2014

Thank you.