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

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#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
Website Find
Datguy5 Offline
Senior Member

Posts: 629
Threads: 25
Joined: Dec 2011
Reputation: 12
#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
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#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
Website Find
Datguy5 Offline
Senior Member

Posts: 629
Threads: 25
Joined: Dec 2011
Reputation: 12
#4
RE: Level Doors Dosnt work when locked...

Show us the script.
01-12-2012, 05:09 PM
Find
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#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
Website Find
Datguy5 Offline
Senior Member

Posts: 629
Threads: 25
Joined: Dec 2011
Reputation: 12
#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
Tripication Offline
Member

Posts: 172
Threads: 19
Joined: Dec 2011
Reputation: 6
#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
rallelol Offline
Member

Posts: 53
Threads: 11
Joined: Dec 2011
Reputation: 1
#8
RE: Level Doors Dosnt work when locked...

It's "SetLevelDoorLocked" And not SetSwingDoorLocked!
01-13-2012, 01:17 PM
Find
Tripication Offline
Member

Posts: 172
Threads: 19
Joined: Dec 2011
Reputation: 6
#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




Users browsing this thread: 2 Guest(s)