The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Working secret door?
goodcap Offline
Member

Posts: 193
Threads: 112
Joined: Jun 2012
Reputation: 3
#1
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
03-20-2017, 06:04 PM
Find


Messages In This Thread
Working secret door? - by goodcap - 03-20-2017, 06:04 PM
RE: Working secret door? - by Mudbill - 03-20-2017, 11:11 PM



Users browsing this thread: 1 Guest(s)