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 Lever opening bookshelf?
Biscuitbarrel Offline
Junior Member

Posts: 4
Threads: 1
Joined: Apr 2012
Reputation: 0
#1
Lever opening bookshelf?

Hey, I'm working on my first custom story mod. It's more of a practice thing for myself, because I'm just learning scripting for HPL2 and want to understand all the mechanics I can before going into my big project idea.

I've got a hunk of code to fix. I'm trying to make a lever move a bookshelf.

void OnStart()
{
    SetEntityConnectionStateChangeCallback("lever_1, "PullLever");
}

void PullLever(string &in asEntity, int alState)
{
    if (alState == 1)
    {
    AddBodyForce("secret_shelf_1", 0, 0, -3, "world");
    }
}

Can someone tell me exactly what's up? Should I be using AddBodyForce, AddBodyImpulse, AddPropForce, or AddPropImpulse? And what's the difference? Remember, I'm brand-spanking-new to this. Mostly. I have also made a readable note and an unlock-able door.
(This post was last modified: 04-27-2012, 11:41 PM by Biscuitbarrel.)
04-27-2012, 11:40 PM
Find


Messages In This Thread
Lever opening bookshelf? - by Biscuitbarrel - 04-27-2012, 11:40 PM
RE: Lever opening bookshelf? - by SilentStriker - 04-27-2012, 11:45 PM
RE: Lever opening bookshelf? - by Biscuitbarrel - 04-27-2012, 11:52 PM
RE: Lever opening bookshelf? - by Cranky Old Man - 04-27-2012, 11:53 PM
RE: Lever opening bookshelf? - by Biscuitbarrel - 04-28-2012, 01:43 PM
RE: Lever opening bookshelf? - by Cranky Old Man - 04-28-2012, 01:57 PM
RE: Lever opening bookshelf? - by Biscuitbarrel - 05-10-2012, 11:05 PM
RE: Lever opening bookshelf? - by Cranky Old Man - 05-11-2012, 02:13 PM
RE: Lever opening bookshelf? - by Adrianis - 05-11-2012, 02:06 PM



Users browsing this thread: 1 Guest(s)