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


Messages In This Thread
RE: Level Doors Dosnt work when locked... - by Tripication - 01-13-2012, 02:18 AM



Users browsing this thread: 2 Guest(s)