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
How add Multi Doors and Keys? Help me please!!!
ClayPigeon Offline
Member

Posts: 214
Threads: 13
Joined: Mar 2012
Reputation: 8
#6
RE: How add Multi Doors and Keys? Help me please!!!

(03-24-2012, 07:24 PM)Your Computer Wrote: Y u no use parameters?
Oh yeah I forgot, you can make one function to multiple doors.


void unlock_door(string &in item, string &in door)
{
SetSwingDoorLocked(door, false, true);
PlaySoundAtEntity("", "unlock_door", door, 0, false);
RemoveItem(item);
}

That's the function, now simply on every door you add:

AddUseItemCallback("", "key_name", "door_name", "unlock_door", true);

AddUseItemCallback("", "key_name2", "door_name2", "unlock_door", true);


Etc.
Should save you a bunch of lines if you have much doors.
03-24-2012, 07:59 PM
Find


Messages In This Thread
RE: How add Multi Doors and Keys? Help me please!!! - by ClayPigeon - 03-24-2012, 07:59 PM



Users browsing this thread: 1 Guest(s)