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 SOLVED - Levers Script
MsHannerBananer Offline
Member

Posts: 218
Threads: 34
Joined: Sep 2013
Reputation: 10
#1
SOLVED - Levers Script

Objective: 7 switches needed to be in the same position before another switch unlocks, which allows the player to progress.

Following Mudbills tutorial aaaaaand of course I got stuck, because the function isn't calling at all. Yay me.

void LeverPuzzle(string &in asEntity, int LeverState)
{
    if(GetLeverState("marine") == -1
    && GetLeverState("pump") == -1
    && GetLeverState("animal") == -1
    && GetLeverState("quarters1") == -1
    && GetLeverState("quarters2") == -1
    && GetLeverState("quarters3") == -1
    && GetLeverState("quarters4") == -1)
    {
        SetPropStaticPhysics("main_switch1", false);
        SetLeverStuckState("marine", -1, true);
        SetLeverStuckState("pump", -1, true);
        SetLeverStuckState("animal", -1, true);
        SetLeverStuckState("quarters1", -1, true);
        SetLeverStuckState("quarters2", -1, true);
        SetLeverStuckState("quarters3", -1, true);
        SetLeverStuckState("quarters4", -1, true);
    }
}

void MainSwitch1(string &in entity, int alState)//For when the above script sets this switch's staticstate to false and it can be moved into the proper position//
{
     if(alState == -1)
    {
    SetPropStaticPhysics("main_switch1", true);
    }
}

Yes, I've checked, double checked, and triple checked my names. They all match. The function isn't calling at all.

(This post was last modified: 04-01-2014, 04:01 AM by MsHannerBananer.)
03-31-2014, 07:49 AM
Find


Messages In This Thread
SOLVED - Levers Script - by MsHannerBananer - 03-31-2014, 07:49 AM
RE: Levers Script - by Mudbill - 03-31-2014, 09:26 AM
RE: Levers Script - by MsHannerBananer - 03-31-2014, 10:41 AM
RE: Levers Script - by Romulator - 03-31-2014, 11:10 AM
RE: Levers Script - by Mudbill - 03-31-2014, 01:42 PM
RE: Levers Script - by Romulator - 03-31-2014, 02:03 PM
RE: Levers Script - by MsHannerBananer - 03-31-2014, 08:15 PM
RE: Levers Script - by Mudbill - 03-31-2014, 02:15 PM
RE: Levers Script - by Mudbill - 03-31-2014, 10:44 PM
RE: Levers Script - by MsHannerBananer - 04-01-2014, 12:04 AM
RE: Levers Script - by MsHannerBananer - 04-01-2014, 04:01 AM



Users browsing this thread: 1 Guest(s)