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
AddBodyForce Cabinet Doors Script Problem
Mazl Offline
Junior Member

Posts: 5
Threads: 1
Joined: Jun 2013
Reputation: 0
#1
AddBodyForce Cabinet Doors Script Problem

Hello guys,

i want to get the two nice cabinet doors fast open with the BodyForce-Command. I dont know, whats the problem in this script Sad

SetSwingDoorDisableAutoClose("cabinet_nice_2", true);
  SetSwingDoorLocked("cabinet_nice_2",false,true);
  StartPlayerLookAt("lookatentitycabinet", 2, 2, "");
  SetMessage("Intro", "Intro11", 2.0f);
  AddEntityCollideCallback("Player", "Furniture_Shock_Area", "cabinetscare", true, 1);
}

void cabinetscare (string &in asParent, string &in asChild, int alState)
{  
  PlaySoundAtEntity("cabinetopensound","break_wood.snt","Player",0.1f,false);
  AddBodyForce("cabinet_nice_2_Body_1",0,0,-2000,"world");
  AddBodyForce("cabinet_nice_2_Body_2",0,0,-2000,"world");
  AddPlayerBodyForce(0, 0, -30000, false);          
  SetEntityActive("servant_grunt_1", true);
  SetPlayerSanity(0.4f);
  FadeOut(1.0f);
  ChangeMap("map_1", "PlayerStartArea_1","","");
}

I want to open it in the same direction like "AddPlayerBodyForce", which works correctly, but by the cabinet nothing happens, just a little bugging...

PS: sry for my bad english, i am german ^.^
PPS: its not the whole code, i just copied that, which is important ^-^
(This post was last modified: 06-16-2013, 05:22 PM by Mazl.)
06-13-2013, 01:45 PM
Find


Messages In This Thread
AddBodyForce Cabinet Doors Script Problem - by Mazl - 06-13-2013, 01:45 PM



Users browsing this thread: 1 Guest(s)