Frictional Games Forum (read-only)

Full Version: StaticPhysics off not working
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
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".
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.