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
UNEXPECTED END OF FILE ERROR?
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#2
RE: UNEXPECTED END OF FILE ERROR?

Fixed up some of the misplaced brackets and syntax; also placed the callbacks on start and added an "OnLeave" function.:


void OnStart()
{
SetEntityCallbackFunc("needle_1", "jump");
AddUseItemCallback("", "hallwaykey_1", "mansion_2", "UsedKeyOnDoor", true);
AddUseItemCallback("", "needle_1", "mansion_4", "Needle", true);
}

void jump(string &in asEntity, string &in asType)
{
SetEntityActive("pig", true);
PlayGuiSound("21/21_scream10.ogg", 1.0f);
StartScreenShake(0.25f, 0.25, 0, 0.25);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_2", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_2", 0, false);
RemoveItem("hallwaykey_1");
}

void Needle(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_4", false);
PlaySoundAtEntity("", "unlock_door", "mansion_4", 0, false);
RemoveItem("needle_1");
}

void OnEnter()
{

}

void OnLeave()
{

}

Hope that helped!

I rate it 3 memes.
07-27-2012, 09:59 AM
Find


Messages In This Thread
UNEXPECTED END OF FILE ERROR? - by taz251 - 07-27-2012, 09:33 AM
RE: UNEXPECTED END OF FILE ERROR? - by Adny - 07-27-2012, 09:59 AM
RE: UNEXPECTED END OF FILE ERROR? - by taz251 - 07-27-2012, 10:06 AM
RE: UNEXPECTED END OF FILE ERROR? - by Adny - 07-27-2012, 10:15 AM
RE: UNEXPECTED END OF FILE ERROR? - by taz251 - 07-27-2012, 10:22 AM



Users browsing this thread: 1 Guest(s)