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
Machine Lever Problem...
sasukeroxxx Offline
Junior Member

Posts: 39
Threads: 5
Joined: Sep 2011
Reputation: 0
#1
Exclamation  Machine Lever Problem...

Hi, im Brazilian, sorry for bad english :3

so,

I'm trying to run a combination of levers on the machine, I tried but could not find tutorials,and I was improvising and comparing with others to see if it worked, but I can not at all.Here is my script out, what's wrong with it? D: the levers are: L1, 2,3,4,5,6 ... I wanted the combination would be: up, up, down, up, down, up. that the machine would be the sum, 11up and 8 down. Help please '-'


void OnStart(){
}

void Levers(string &in asEntity, int alState){    /*Set values depending on up/down postion or 0 for middle     */    if(alState == -1){        if(asEntity == "L1") SetLocalVarInt("up_"+asEntity, 3);        else if(asEntity == "L2") SetLocalVarInt("up_"+asEntity, 3);        else if(asEntity == "L3") SetLocalVarInt("up_"+asEntity, 5);        else if(asEntity == "L4") SetLocalVarInt("up_"+asEntity, 1);        else if(asEntity == "L5") SetLocalVarInt("up_"+asEntity, 2);        else if(asEntity == "L6") SetLocalVarInt("up_"+asEntity, 4);                CheckValue(asEntity);            }    else if(alState == 1){        if(asEntity == "L1") SetLocalVarInt("down_"+asEntity, 1);        else if(asEntity == "L2") SetLocalVarInt("down_"+asEntity, 5);        else if(asEntity == "L3") SetLocalVarInt("down_"+asEntity, 6);        else if(asEntity == "L4") SetLocalVarInt("down_"+asEntity, 5);        else if(asEntity == "L5") SetLocalVarInt("down_"+asEntity, 2);        else if(asEntity == "L6") SetLocalVarInt("down_"+asEntity, 2);                CheckValue(asEntity);    }            else if(alState == 0){        SetLocalVarInt("up_"+asEntity, 0);        SetLocalVarInt("down_"+asEntity, 0);        }            if(GetLocalVarInt("up_value") == 11 && GetLocalVarInt("down_value") == 8){        SetEntityActive("ShardDoor", false);        GiveSanityBoost();        PlayMusic("02_puzzle.ogg", false, 0.7f, 0, 10, false);        PlaySoundAtEntity("door_safety_open", "door_safety_open.snt", "Player", 0.0f, false);        }}
void CheckValue(string sEntity){    PlaySoundAtEntity("s"+sEntity, "lever_mech_min_max", sEntity, 0.0f, false);
    SetLocalVarInt("up_value", 0);    SetLocalVarInt("down_value", 0);            for(int i=1;i<=6;i++){        AddLocalVarInt("up_value", GetLocalVarInt("up_L"+i));        AddLocalVarInt("down_value", GetLocalVarInt("down_L"+i));    }}

void OnEnter(){    PlayMusic("18_amb.ogg", true, 1, 2.0f, 0, false);    }
void OnLeave(){    StopMusic(2,0);}


Hallucination

Constantine - in Construction
(This post was last modified: 12-07-2011, 04:44 AM by sasukeroxxx.)
11-29-2011, 11:57 PM
Find


Messages In This Thread
Machine Lever Problem... - by sasukeroxxx - 11-29-2011, 11:57 PM
RE: Machine Lever Problem... - by flamez3 - 11-30-2011, 01:56 AM
RE: Machine Lever Problem... - by GreyFox - 11-30-2011, 03:55 AM
RE: Machine Lever Problem... - by flamez3 - 11-30-2011, 04:44 AM
RE: Machine Lever Problem... - by sasukeroxxx - 12-05-2011, 08:48 PM
RE: Machine Lever Problem... - by flamez3 - 12-06-2011, 03:49 AM
RE: Machine Lever Problem... - by Your Computer - 12-06-2011, 04:29 AM
RE: Machine Lever Problem... - by sasukeroxxx - 12-07-2011, 04:42 AM



Users browsing this thread: 1 Guest(s)