03-04-2012, 04:10 PM
Hey guys!
This is my first script ever, I am just playing around a little bit. Also took some help from tutorials.
However, when I added the Entity collision for the third room area, I started to get this error:
"Unexpected end of file". Any idea what's wrong?
http://pastebin.com/fzi7bta2 Here's the code <-
EDIT: Finally found that little bastard It was this:
This is my first script ever, I am just playing around a little bit. Also took some help from tutorials.
However, when I added the Entity collision for the third room area, I started to get this error:
"Unexpected end of file". Any idea what's wrong?
http://pastebin.com/fzi7bta2 Here's the code <-
PHP Code:
void OnStart()
{
AddEntityCollideCallback("Player", "RoomTwoArea", "CollideRoomTwo", true, 1);
AddEntityCollideCallBack("Player", "RoomThreeArea", "CollideRoomThree", true, 1");
AddUseItemCallback("", "key_study_1", "mansion_2", "UnlockDD", true);
AddUseItemCallback("", "ceremony_knife_1", "work_desk_door_1", "UnlockDD", true);
GiveItemFromFile("lantern", "lantern.ent");
SetPlayerLampOil(100.0f);
}
void CollideRoomTwo(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("mansion_2", true, true);
StartPlayerLookAt("mansion_2", 10, 10, "");
PlaySoundAtEntity("", "00_laugh.snt", "mansion_2", 0, false);
AddTimer("close", 1, "stoplook");
}
void CollideRoomThree(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("agrippa_head_1", true);
StartPlayerLookAt("agrippa_head_1", 10, 10, "");
PlaySoundAtEntity("", "00_laugh.snt", "graveyard_corpse_1", 0, false);
AddTimer("lolol", 1, "stoplook");
SetPropHealth("pot_explode", 0);
}
void UnlockDD(string &in item, string &in door)
{
SetSwingDoorLocked(door, false, true);
PlaySoundAtEntity("", "scare_slam_door.snt", door, 0, false);
RemoveItem(item);
}
void stoplook(string &in asTimer)
{
StopPlayerLookAt();
}
void OnEnter()
{
}
void OnLeave()
{
}
EDIT: Finally found that little bastard It was this:
PHP Code:
AddEntityCollideCallBack("Player", "RoomThreeArea", "CollideRoomThree", true, 1");