Working secret door?
I'm re-creating the secret office door from A Machine For Pigs. This is my setup:
Lever
Name: lever_small01_1
ConnectionStateChangeCallback: SecretDoor1
Secret Painting Door
Name: OfficeSecretDoor
ConnectionStateChangeCallback: SecretDoor1
Locked: YES
SCRIPT
oid SecretDoor1(string &in asEntity, int alState)
{
AddTimer("", 0, "TimerPushSecret");
SetLocalVarInt("SecretDoorOpen", 1);
SetEntityInteractionDisabled("secretdoorswitchsecretdoorswitch", false);
}
void TimerPushSecret(string &in asTimer)
{
SetSwingDoorLocked("secretdoorswitchsecretdoorswitch", false, false);
SetSwingDoorClosed("secretdoorswitchsecretdoorswitch", false, false);
SetSwingDoorDisableAutoClose("secretdoorswitchsecretdoorswitch", true);
AddBodyForce("secretdoorswitchsecretdoorswitch", 0.0f, 0.0f, -8000.0f, "world");
}
Everything seems to work except for the door automatically opening that should be happening thanks to the AddBodyForce line
|