script help
void Onstart()
{
AddUseItemCallback("", "stone_hammer_chipper", "wooden_boards_block_1", "DestoryBlockage", true);
SetEntityPlayerInteractCallback("key_laboratory_1", "Scare", true);
AddEntityCollideCallback("Player", "Message_1", "Message1", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_2", "OpenDoor", true, 1);
AddUseItemCallback("OpenDoor", "key_laboratory_2", "level_wood_3", "UnlockLevelDoor", true);
}
void DestoryBlockage(string &in asItem, string &in asEntity)
{
AddPlayerSanity(25);
SetPropHealth("wooden_boards_block_1", 0.0f);
SetEntityActive("wooden_boards_block_broken_1",true);
RemoveItem("stone_hammer_chipper");
SetEntityActive("wooden_boards_block_1", false);
PlaySoundAtEntity("","break_wood_metal.snt", "ScriptArea_1", 0, false);
}
void UnlockLevelDoor(string &in item, string &in entity)
{
SetLevelDoorLocked(entity, false);
RemoveItem("key_laboratory_2");
PlaySoundAtEntity("", "unlock_door", "player", 0, false);
}
void Message1(string &in asChild, string &in asParent, int alState)
{
SetMessage("Messages", "PopupM", 0);
}
void Scare(string &in Entity)
{
SetEntityActive("armour_nice_complete_4", true);
SetEntityActive("armour_nice_complete_5", true);
SetEntityActive("armour_nice_complete_6", true);
}
void OnEnter()
{
}
void Onleave()
{
}
this whole room doesnt work i cant figure it out?
|