(03-06-2013, 06:24 PM)darksky Wrote: you have to put SetEntityCallbackFunc in a function
like
void OnStart(){
SetEntityCallbackFunc("GuestRoomKey", "jump");
}
void OnStart (){
SetEntityCallbackFunc("GuestRoomKey", "jump");
}
{
AddUseItemCallback("", "GuestRoomKey", "door01", "UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door01", false, true);
PlaySoundAtEntity("", "Unlock_door", "door01", 0, false);
RemoveItem("GuestRoomKey");
}
void jump(string &in asEntity, string &in type)
{
SetEntityActive("corpse01", true);
PlaySoundAtEntity("", "21_screams.snt", "corpse01", 0, false);
}
void OnEnter()
{
}
void OnLeave()
{
}
This is the whole file. I just cant get it to work. I've searched for the error on the page but I cant find it. I dont get what the problem is