Frictional Games Forum (read-only)
StaticPhysics off not working - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: StaticPhysics off not working (/thread-19558.html)



StaticPhysics off not working - Damascus - 12-15-2012

Okay, holy crap this problem is driving me insane, as I can see no problems with my script. I've placed a chair in my map that I've called "fall_object_1." (Yes, I've double checked) This is my script:

PHP Code:
void OnStart()
{
    
SetPropStaticPhysics("fall_object_1"true);
    
SetEntityPlayerInteractCallback("fall_object_1""FallObject"true);
}

void FallObject(string &in asEntity)
{
    
SetMessage("Doors""inside"0);
    
SetPropStaticPhysics("fall_object_1"false);


The message shows on the screen when I interact with the chair, but though the chair's static physics turn on when the map is started, it doesn't turn off when I interact with the chair.


RE: StaticPhysics off not working - The chaser - 12-15-2012

Try:

void OnStart()
{
SetPropStaticPhysics("fall_object_1", true);
SetEntityCallbackFunc("fall_object_1", "FallObject";
}

void FallObject(string &in asEntity, string &in asType)
{
SetMessage("Doors", "inside", 0);
SetPropStaticPhysics("fall_object_1", false);
}

Your problem is really weird, Damascus-Try to put "true" another time instead "false".


RE: StaticPhysics off not working - NaxEla - 12-17-2012

That is really weird. If I remember correctly, there's an option in the level editor to turn StaticPhysics on and off. You could try that.