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
SetSwingDoorClosed won't work
Raymond Offline
Member

Posts: 126
Threads: 24
Joined: Feb 2011
Reputation: 0
#1
SetSwingDoorClosed won't work

As the title said, when i walk into the area, the door won't close. I put it like this:
void CloseDoorScare(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("mansion_1", true, true);
}

Please help.

One World To Another [DEMO] coming soon.
(This post was last modified: 03-15-2011, 07:32 AM by Raymond.)
03-15-2011, 07:29 AM
Find
Linus Ågren Offline
Senior Member

Posts: 309
Threads: 58
Joined: Jan 2011
Reputation: 5
#2
RE: SetSwingDoorClosed won't work

That code doesn't close the door. It only makes it closed as if you didn't hold the handle down. To close it, you will need to make an AddPropImpulse.

Creator of The Dark Treasure.
(This post was last modified: 03-15-2011, 09:30 AM by Linus Ågren.)
03-15-2011, 09:22 AM
Website Find
nkmol Offline
Senior Member

Posts: 252
Threads: 19
Joined: Feb 2011
Reputation: 4
#3
RE: SetSwingDoorClosed won't work

i've made the same ;

void OnEnter()
{
AddEntityCollideCallback("Player", "ScriptArea", "Callback", true, 1);
}

void CallBack(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorLocked("sewer_arched_1", true, true);
//ofc i added some more events to happen ;) this one i used for the door :P
}

now you have to fill your own propeties Smile
this wil suddenly close the door in a blink of an eye Tongue but it won't close it as a effect, just look unatural. If you can't see the door and it close, then you can use it i geuss Wink
if you want to see the door closing like a 'bang' you should use AddPropImpulse, as junkfood said Tongue
(This post was last modified: 03-16-2011, 04:05 PM by nkmol.)
03-16-2011, 04:04 PM
Find
Raymond Offline
Member

Posts: 126
Threads: 24
Joined: Feb 2011
Reputation: 0
#4
RE: SetSwingDoorClosed won't work

I use the "AddPropImpulse" script for the door but it won't open, it only looks like someone kicked the door Undecided.

One World To Another [DEMO] coming soon.
03-17-2011, 03:20 AM
Find
Linus Ågren Offline
Senior Member

Posts: 309
Threads: 58
Joined: Jan 2011
Reputation: 5
#5
RE: SetSwingDoorClosed won't work

http://www.frictionalgames.com/forum/thread-6624.html
I had help with this. Hope you can understand what we did Smile

Creator of The Dark Treasure.
03-17-2011, 07:16 AM
Website Find
Raymond Offline
Member

Posts: 126
Threads: 24
Joined: Feb 2011
Reputation: 0
#6
RE: SetSwingDoorClosed won't work

(03-17-2011, 07:16 AM)junkfood2121 Wrote: http://www.frictionalgames.com/forum/thread-6624.html
I had help with this. Hope you can understand what we did Smile

Thank you very much Big Grin.

One World To Another [DEMO] coming soon.
03-17-2011, 07:30 AM
Find




Users browsing this thread: 1 Guest(s)