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
Level Editor Help Key scripting
HoyChampoy Offline
Junior Member

Posts: 43
Threads: 16
Joined: Jun 2012
Reputation: 0
#2
RE: Key scripting

(07-18-2012, 04:35 AM)Redzombie18 Wrote: Hello Peoples
Of course by the title you know im a noob at Custom story making Tongue
So i want a locked door and you need a key. I followed a tutorial on how to do it, but when i coded it, The custom story crashed. If you can respond Thanks. I might need more help with more Questions soooo if you want to you can add me on:
Steam: Redzombie18
Skype:brianliebrand
Thanks
Redzombie18
void OnStart()
{
AddUseItemCallback("", "nameofkey", "nameofdoor", "KeyOnDoor", true);
}



void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("nameofdoor", false, true);
PlaySoundAtEntity("", "unlock_door", "nameofdoor", 0, false);
AddPlayerSanity(25);
RemoveItem("nameofkey");
}

Welcome To the forums Smile
07-18-2012, 05:42 AM
Find


Messages In This Thread
Key scripting - by Redzombie18 - 07-18-2012, 04:35 AM
RE: Key scripting - by HoyChampoy - 07-18-2012, 05:42 AM



Users browsing this thread: 1 Guest(s)