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 on a raising doorway
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#1
Lever on a raising doorway

Question number 305:

I'm trying to connect a lever to a wooden sliding door from Justine, one that will become active after solving a few puzzles, much like Justine. For the life of me, I can't figure out how to even make the lever open the door in the first place. I had this same issue with a secret door in my last map that I still haven't resolved.

I took a look at the script for the existing Justine puzzle, but to me, it's just a confusing jumble of code I don't understand. I parsed out the code I thought would let me just open the door with the lever, and obviously it isn't working. Are there any suggestions anyone can give me to alter this script, or just to make a new one?

Spoiler below!
const int kLever_Open = -1;
const int kLever_Close = 1;

enum eDoorState
{
eDoorState_Closed,
eDoorState_Open,
eDoorState_Destroyed,
};

void SetDoorState(string &in asDoorName, eDoorState aState)
{
SetLocalVarInt(asDoorName+"_state", aState);

}

bool LeverHelper_Open(string &in asLeverName, int alSlideDoorNum, int alState)
{
if(alState!=kLever_Open) return false;

string sDoorName = "wooden_slide_door_"+alSlideDoorNum;

SetLeverStuckState(asLeverName, alState, true);
SetMoveObjectState(sDoorName, 1.0f);
SetEntityActive("Area_PassedDoor_"+alSlideDoorNum, true);

SetDoorState(sDoorName, eDoorState_Open);

return true;
}

void PuzzleSlideDoor02_LeverPulled(string &in asEntityName, int alState)
{
if(asEntityName=="slide_door02_lever_open")
{
LeverHelper_Open(asEntityName, 2, alState);
}
}

Edit: Found a simple script to fix it.

(This post was last modified: 03-13-2012, 12:32 AM by Damascus.)
03-12-2012, 07:41 AM
Find


Messages In This Thread
Lever on a raising doorway - by Damascus - 03-12-2012, 07:41 AM



Users browsing this thread: 1 Guest(s)