Hello guys,
i want to get the two nice cabinet doors fast open with the BodyForce-Command. I dont know, whats the problem in this script
SetSwingDoorDisableAutoClose("cabinet_nice_2", true);
SetSwingDoorLocked("cabinet_nice_2",false,true);
StartPlayerLookAt("lookatentitycabinet", 2, 2, "");
SetMessage("Intro", "Intro11", 2.0f);
AddEntityCollideCallback("Player", "Furniture_Shock_Area", "cabinetscare", true, 1);
}
void cabinetscare (string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("cabinetopensound","break_wood.snt","Player",0.1f,false);
AddBodyForce("cabinet_nice_2_Body_1",0,0,-2000,"world");
AddBodyForce("cabinet_nice_2_Body_2",0,0,-2000,"world");
AddPlayerBodyForce(0, 0, -30000, false);
SetEntityActive("servant_grunt_1", true);
SetPlayerSanity(0.4f);
FadeOut(1.0f);
ChangeMap("map_1", "PlayerStartArea_1","","");
}
I want to open it in the same direction like "AddPlayerBodyForce", which works correctly, but by the cabinet nothing happens, just a little bugging...
PS: sry for my bad english, i am german ^.^
PPS: its not the whole code, i just copied that, which is important ^-^