Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can anyone help me find the Script Error?
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#2
RE: Can anyone help me find the Script Error?

SetLevelDoorLocked doesn't have the same amount of arguments as a swing door, there is 1 less Boolean value. Also, the name of the key in the callback/function didn't match (capitalization issue.) Here's a revision:


void OnStart()
{
AddUseItemCallback("", "key_Tomb_1", "Doortodeath_1", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("Doortodeath_1", false);
PlaySoundAtEntity("", "unlock_door", "Doortodeath_1", 0.0f, false);
RemoveItem("key_Tomb_1");
AddDebugMessage("Key On Door", false);
}

////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}


Also, I wouldn't like to be in the credits if it means there's a chance my name will be associated with Pewdiepie. Thanks for understanding.

Hope that helped!

I rate it 3 memes.
09-13-2012, 04:57 AM
Find


Messages In This Thread
RE: Can anyone help me find the Script Error? - by Adny - 09-13-2012, 04:57 AM



Users browsing this thread: 4 Guest(s)