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 Quick Lever Problem
3gamers Offline
Junior Member

Posts: 10
Threads: 6
Joined: Oct 2013
Reputation: 0
#1
Quick Lever Problem

Okay so there's four levers that need to be pulled to unlock the door. I've written the script using the wiki http://wiki.frictionalgames.com/hpl2/tut...cretshelfs so it's kind of frustrating that it doesn't work.
Someone please help. I would GREATLY appreciate it.
I've checked and double checked all the names so that's not the problem.

void OnStart()
{
SetLocalVarInt("Var1", 0);
SetEntityConnectionStateChangeCallback("Lever1", "func1");
SetEntityConnectionStateChangeCallback("Lever2", "func2");
SetEntityConnectionStateChangeCallback("Lever3", "func3");
SetEntityConnectionStateChangeCallback("Lever4", "func4");
}

void func1(string &in asEntity, int alState)
{
if (alState == 1)
{
AddLocalVarInt("Var1", 1);
func5();
}
}

void func2(string &in asEntity, int alState)
{
if (alState == 1)
{
AddLocalVarInt("Var1", 1);
func5();
}
}

void func3(string &in asEntity, int alState)
{
if (alState == 1)
{
AddLocalVarInt("Var1", 1);
func5();
}
}

void func4(string &in asEntity, int alState)
{
if (alState == 1)
{
AddLocalVarInt("Var1", 1);
func5();
}
}

void func5()
{
if(GetLocalVarInt("Var1") == 4)
{
SetLevelDoorLocked("level_cistern_1", false);
}
}

Nepenthe- WIP
(This post was last modified: 11-03-2013, 05:51 AM by 3gamers.)
11-03-2013, 05:44 AM
Find


Messages In This Thread
Quick Lever Problem - by 3gamers - 11-03-2013, 05:44 AM
RE: Quick Lever Problem - by Rapture - 11-03-2013, 07:23 AM
RE: Quick Lever Problem - by Daemian - 11-03-2013, 10:15 AM
RE: Quick Lever Problem - by PutraenusAlivius - 11-03-2013, 10:41 AM



Users browsing this thread: 1 Guest(s)