12-30-2011, 04:10 AM
hello i get error at 44,2 at this script im going to make a crowbar that opens a door here is script "
PHP Code:
void OnStart()
{
SetEntityConnectionStateChangeCallback("lever", "func_shelf");
AddEntityCollideCallback("Player", "monsterspawn_1", "MonsterFunction", true, 1);
AddEntityCollideCallback("servant_brute_1", "servant_grunt_1_remove", "RemoveMonster", true, 1);
AddUseItemCallback("", "crowbar_1", "mansion_1", "CrowbarOnDoor", true);
}
void func_shelf(string &in asEntity, int alState)
{
if (alState == 1)
{
SetMoveObjectState("shelf",1.0f);
PlaySoundAtEntity("", "quest_completed.snt", "shelf_move_1", 0, false);
return;
}
}
void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_brue_1", true);
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_3", 0, "");
}
void RemoveMonster(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_brute_1", false);
}
void CrowbarOnDoor(string &in item, string &in door)
{
SetSwingDoorLocked(mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem(crowbar_1);
}
void OnEnter()
{
}
void OnLeave()
{
}

how do i do that