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
Problem with door-opening script
ArtoLP Offline
Junior Member

Posts: 9
Threads: 5
Joined: Feb 2012
Reputation: 0
#1
Problem with door-opening script

Hello everybody! Smile

I've got a problem with the opening of a specific door. I want it to open slowly and creepy, but it doesn't open at all Dodgy

Well, when I trigger the script ingame, i can hear the "door-touch-sound" Big Grin
You now what I mean, the sound that plays when you just touch the door, but don't move it. What is wrong?



void OnStart()
{
AddEntityCollideCallback("Player","door_open","dooropen",true,1);
}



void dooropen(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorDisableAutoClose("door4", true);
SetSwingDoorClosed("door4", false, true);

AddPropForce("door4",-600,-600,-600,"world");
}


Thank you! Smile
11-17-2013, 02:23 PM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#2
RE: Problem with door-opening script

Since you can hear the sound, I would assume the door is in fact opening, but maybe check which way your AddPropForce() command should add force to?

Just an idea if you haven't tried that :3

Discord: Romulator#0001
[Image: 3f6f01a904.png]
11-17-2013, 02:35 PM
Find
ArtoLP Offline
Junior Member

Posts: 9
Threads: 5
Joined: Feb 2012
Reputation: 0
#3
RE: Problem with door-opening script

I tried it, but it still doesn't work Sad
11-17-2013, 03:32 PM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#4
RE: Problem with door-opening script

(11-17-2013, 03:32 PM)ArtoLP Wrote: I tried it, but it still doesn't work Sad
-600 should be WAY too much..
Mine are like 60 if i am correct.

Try 10,10,10 then
10,0,10 then
0,10,0 etc etc..

You need to check what way your door is opening.

Then make the script in like 2 meter in front of the door.
then you can see if somethign actually happens.
whn you fixed it then just put the scriptarea back where you wanted it to be at first.
(This post was last modified: 11-17-2013, 04:50 PM by DnALANGE.)
11-17-2013, 04:49 PM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#5
RE: Problem with door-opening script

I don't remember right now, but try this:
AddPropImpulse( "door4", 0, 0, 3, "Local" );


If still nothing, then add a timer to call that impulse again, with a delay of 0.2.

11-17-2013, 09:42 PM
Find




Users browsing this thread: 1 Guest(s)