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
Lever Opening a Bookcase [SOLVED]
Thor Offline
Junior Member

Posts: 12
Threads: 1
Joined: Oct 2011
Reputation: 0
#1
Lever Opening a Bookcase [SOLVED]

My apologies if this is a stupid question but I've followed this tutorial: ( http://wiki.frictionalgames.com/hpl2/tut...cretshelfs ) to the letter and I've had no luck in getting the lever to actually do anything. I've double and triple checked all of the entity names in both the level editor and the script. I've made sure that the script is in the same folder as the level file and still nothing.

Here's the script file I'm using:
void OnStart()
{
SetEntityConnectionStateChangeCallback("lever","func_shelf");
}


void func_shelf(string &in asEntity, int alState)
{
    if (alState == 1)
    {
    SetMoveObjectState("shelf",1.0f);
    PlaySoundAtEntity("", "quest_completed.snt", "shelf_move_1", 0, false);
          return;
    }
}

do I need to insert the function names into one of the callback fields on the entity tab for the lever or case?

(This post was last modified: 11-01-2011, 08:37 PM by Thor.)
10-30-2011, 03:53 AM
Find


Messages In This Thread
Lever Opening a Bookcase [SOLVED] - by Thor - 10-30-2011, 03:53 AM
RE: Lever Opening a Bookcase - by flamez3 - 10-30-2011, 04:11 AM
RE: Lever Opening a Bookcase - by Thor - 10-30-2011, 04:18 AM
RE: Lever Opening a Bookcase - by flamez3 - 10-30-2011, 04:23 AM
RE: Lever Opening a Bookcase - by Thor - 10-30-2011, 04:43 AM
RE: Lever Opening a Bookcase - by flamez3 - 10-30-2011, 04:50 AM
RE: Lever Opening a Bookcase - by Thor - 10-30-2011, 05:02 AM
RE: Lever Opening a Bookcase - by flamez3 - 10-30-2011, 05:15 AM
RE: Lever Opening a Bookcase - by Thor - 10-30-2011, 05:33 AM
RE: Lever Opening a Bookcase - by flamez3 - 10-30-2011, 07:08 AM
RE: Lever Opening a Bookcase - by Thor - 10-30-2011, 07:21 AM
RE: Lever Opening a Bookcase - by flamez3 - 10-30-2011, 07:39 AM
RE: Lever Opening a Bookcase - by Thor - 10-30-2011, 04:52 PM
RE: Lever Opening a Bookcase - by GreyFox - 10-30-2011, 05:43 PM
RE: Lever Opening a Bookcase - by Thor - 10-30-2011, 05:45 PM
RE: Lever Opening a Bookcase - by flamez3 - 10-31-2011, 01:13 AM
RE: Lever Opening a Bookcase - by Thor - 10-31-2011, 01:27 AM
RE: Lever Opening a Bookcase - by GreyFox - 10-31-2011, 01:56 AM
RE: Lever Opening a Bookcase - by flamez3 - 10-31-2011, 02:05 AM
RE: Lever Opening a Bookcase - by Thor - 10-31-2011, 02:12 AM
RE: Lever Opening a Bookcase - by GreyFox - 10-31-2011, 02:32 AM
RE: Lever Opening a Bookcase - by Thor - 10-31-2011, 02:44 AM
RE: Lever Opening a Bookcase - by GreyFox - 10-31-2011, 02:52 AM
RE: Lever Opening a Bookcase - by Thor - 11-01-2011, 08:37 PM



Users browsing this thread: 1 Guest(s)