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
Configuration Files Help Level Doors Dosnt work when locked...
Author Message
jessehmusic Offline
Senior Member

Posts: 423
Joined: Dec 2011
Reputation: 8
Post: #1
Level Doors Dosnt work when locked...
why does my level doors stop wokring when i have it on locked... cant get it to work Sad

http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
01-12-2012 04:53 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Datguy5 Offline
Senior Member

Posts: 622
Joined: Dec 2011
Reputation: 12
Post: #2
RE: Level Doors Dosnt work when locked...
....Because they are locked like normal doors.You need a key,button or something else to unlock it..If thats what you mean.
(This post was last modified: 01-12-2012 04:56 PM by Datguy5.)
01-12-2012 04:55 PM
Find all posts by this user Quote this message in a reply
jessehmusic Offline
Senior Member

Posts: 423
Joined: Dec 2011
Reputation: 8
Post: #3
RE: Level Doors Dosnt work when locked...
I have made keys scripted them and that sh**

http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
01-12-2012 05:02 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Datguy5 Offline
Senior Member

Posts: 622
Joined: Dec 2011
Reputation: 12
Post: #4
RE: Level Doors Dosnt work when locked...
Show us the script.
01-12-2012 05:09 PM
Find all posts by this user Quote this message in a reply
jessehmusic Offline
Senior Member

Posts: 423
Joined: Dec 2011
Reputation: 8
Post: #5
RE: Level Doors Dosnt work when locked...
PHP Code: (Select All)
void OnStart(){AddUseItemCallback("""Cell Door Key""Lockeddoor_2""KeyOnDoor2"true); 

}

void KeyOnDoor2(string &in asItemstring &in asEntity)

{

    
SetSwingDoorLocked("Lockeddoor_2"falsetrue);

    
PlaySoundAtEntity("""unlock_door""Lockeddoor_2"0false);

    
RemoveItem("Cell Door Key");

    
SetPropHealth("Lockeddoor_2"0);



http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
(This post was last modified: 01-12-2012 05:17 PM by jessehmusic.)
01-12-2012 05:16 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Datguy5 Offline
Senior Member

Posts: 622
Joined: Dec 2011
Reputation: 12
Post: #6
RE: Level Doors Dosnt work when locked...
I think it should be like this
AddUseItemCallback("", "Cell Door Key", "Lockeddoor_2", "KeyOnDoor2", true);
}
void KeyOnDoor2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Lockeddoor_2", false, true);
PlaySoundAtEntity("", "unlock_door", "Lockeddoor_2", 0, false);
RemoveItem("Cell Door Key");
SetPropHealth("Lockeddoor_2", 0);
}
(This post was last modified: 01-12-2012 05:23 PM by Datguy5.)
01-12-2012 05:18 PM
Find all posts by this user Quote this message in a reply
Tripication Offline
Member

Posts: 172
Joined: Dec 2011
Reputation: 6
Post: #7
RE: Level Doors Dosnt work when locked...
(01-12-2012 05:18 PM)Datguy5 Wrote:  I think it should be like this
AddUseItemCallback("", "Cell Door Key", "Lockeddoor_2", "KeyOnDoor2", true);
}
void KeyOnDoor2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Lockeddoor_2", false, true);
PlaySoundAtEntity("", "unlock_door", "Lockeddoor_2", 0, false);
RemoveItem("Cell Door Key");
SetPropHealth("Lockeddoor_2", 0);
}
Why do you have setprophealth, you shouldn't need it at all, nt for unlocking a door.


_______________________________
Oh right, and the solve,You used the wrong callback. Hang on


void OnStart()
{
AddUseItemCallback("", "Cell Door Key", "Lockeddoor_2", "KeyOnDoor2", true);
}

void KeyOnDoor2(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("Lockeddoor_2", false);
PlaySoundAtEntity("", "unlock_door", "Lockeddoor_2", 0, false);
RemoveItem("Cell Door Key");
}






_____________________________________
P.S, Clean up a bit Big Grin
_______________________________
Ok, i think i have it this time.

[Image: speedart__2___yoshimitsu_by_kamofudge-d4yo6kk.png]
(This post was last modified: 01-13-2012 02:28 AM by Tripication.)
01-13-2012 02:18 AM
Find all posts by this user Quote this message in a reply
rallelol Offline
Member

Posts: 51
Joined: Dec 2011
Reputation: 1
Post: #8
RE: Level Doors Dosnt work when locked...
It's "SetLevelDoorLocked" And not SetSwingDoorLocked!
01-13-2012 01:17 PM
Find all posts by this user Quote this message in a reply
Tripication Offline
Member

Posts: 172
Joined: Dec 2011
Reputation: 6
Post: #9
RE: Level Doors Dosnt work when locked...
(01-13-2012 01:17 PM)rallelol Wrote:  It's "SetLevelDoorLocked" And not SetSwingDoorLocked!
I think he fixed it, and didn't bother to reply. or ask just before he went on holiday so hes probably gonna be afk for ages...one of the two i reckon

[Image: speedart__2___yoshimitsu_by_kamofudge-d4yo6kk.png]
01-14-2012 03:18 AM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)