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
Doors not opening when the propforce function is used
ZRPT Offline
Junior Member

Posts: 17
Threads: 3
Joined: Aug 2011
Reputation: 1
#1
Doors not opening when the propforce function is used

I have this area which when a player looks at it, it forces a door to burst open. Here is the coding I have:

Added in onstart:
SetEntityPlayerLookAtCallback("wind", "windopen", true);

Another function I have set to activate the area:
void OnPickup(string &in asEntity, string &in type)
{
if(type == "OnPickup")
  {
   SetEntityActive("doorunlock", true);
   SetEntityActive("wind", true);
  }
}

and last but not least, the actual door function:
void windopen(string &in asEntity, int alState)
{
        
       SetSwingDoorDisableAutoClose("earthquakedoor", true);
       SetSwingDoorClosed("earthquakedoor", false, true);
       AddPropForce("earthquakedoor", -900, -900, -900, "world");

}



Any help would be much appreciated. ALSO telling me to use the collide callback function will not help as I want it to activate after I look at the area.
09-01-2011, 06:46 AM
Find


Messages In This Thread
Doors not opening when the propforce function is used - by ZRPT - 09-01-2011, 06:46 AM



Users browsing this thread: 1 Guest(s)