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
Script Help Teleporting-Naked-Guy Help
MsHannerBananer Offline
Member

Posts: 218
Threads: 34
Joined: Sep 2013
Reputation: 10
#21
RE: Teleporting-Naked-Guy Help

(07-05-2014, 12:53 PM)Harry Potter Wrote:
(07-05-2014, 10:25 AM)MsHannerBananer Wrote:
PHP Code: (Select All)
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: (Select All)
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.

(This post was last modified: 07-05-2014, 08:19 PM by MsHannerBananer.)
07-05-2014, 08:13 PM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#22
RE: Teleporting-Naked-Guy Help

(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: (Select All)
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: (Select All)
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".

"Veni, vidi, vici."
"I came, I saw, I conquered."
07-06-2014, 06:07 AM
Find
CQBgamer Offline
Junior Member

Posts: 40
Threads: 8
Joined: Jul 2014
Reputation: 0
#23
RE: Teleporting-Naked-Guy Help

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.

[Image: 15420.png]
(This post was last modified: 07-08-2014, 12:49 AM by CQBgamer.)
07-08-2014, 12:48 AM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#24
RE: Teleporting-Naked-Guy Help

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.

"Veni, vidi, vici."
"I came, I saw, I conquered."
07-08-2014, 02:59 AM
Find
CQBgamer Offline
Junior Member

Posts: 40
Threads: 8
Joined: Jul 2014
Reputation: 0
#25
RE: Teleporting-Naked-Guy Help

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

Nope. Tried 2000 and -2000.

[Image: 15420.png]
(This post was last modified: 07-08-2014, 03:46 AM by CQBgamer.)
07-08-2014, 03:38 AM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#26
RE: Teleporting-Naked-Guy Help

(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.

"Veni, vidi, vici."
"I came, I saw, I conquered."
07-08-2014, 03:56 AM
Find
CQBgamer Offline
Junior Member

Posts: 40
Threads: 8
Joined: Jul 2014
Reputation: 0
#27
RE: Teleporting-Naked-Guy Help

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.

[Image: 15420.png]
07-08-2014, 05:23 AM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#28
RE: Teleporting-Naked-Guy Help

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.

07-08-2014, 05:25 AM
Find
CQBgamer Offline
Junior Member

Posts: 40
Threads: 8
Joined: Jul 2014
Reputation: 0
#29
RE: Teleporting-Naked-Guy Help

Thank you.

[Image: 15420.png]
07-08-2014, 05:35 AM
Find




Users browsing this thread: 1 Guest(s)