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
How do you make a ladder go down by pulling a lever?
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#1
How do you make a ladder go down by pulling a lever?

I can't find a way to make a ladder go down by pulling a lever, I give up! all! don't send me links to engine scripts, I already checked there and couldn't find on how to make the ladder go down by pulling the lever! I want it to be just like in Justine, but when you pull the lever the ladder goes down alone, not something else to happen! I really want to know what's the code to that but this is what I found in the Justine code

void RollDownLadder()
{    
    if(GetLocalVarInt("ManualLadderPlaced") == 1) return;    // Manual ladder attached, so do not roll down this ladder.

    RotatePropToSpeed("cogwheel_tiny03_1", 1, 1, 0, 0, 1, false, "");
    RotatePropToSpeed("cogwheel_tiny03_2", 1, 1, 0, 0, -1, false, "");
    
    for(int i=1;i<5;i++)
        SetMoveObjectState("ladder4m_tileable_"+i, -1.12);
        
    AddTimer("stoproll", 9.0f, "TimerStopRoll");
    
    PlaySoundAtEntity("laddermove", "L01_ladder_move", "AreaLadderSounds", 1.0, false);
    PlaySoundAtEntity("laddermove2", "L01_ladder_move02", "AreaLadderSounds", 1.0, false);
    PlaySoundAtEntity("beingmove", "L01_ladder", "AreaLadderSounds", 0.0, false);
}

void TimerStopRoll(string &in asTimer)
{
    RotatePropToSpeed("cogwheel_tiny03_1", 0.5f, 0.5f, 0, 0, 0, false, "");
    RotatePropToSpeed("cogwheel_tiny03_2", 0.5f, 0.5f, 0, 0, 0, false, "");
    
    SetEntityActive("LadderArea_1", true);
    
    StopSound("laddermove", 0.5f);
    StopSound("laddermove2", 0.5f);
    
    PlaySoundAtEntity("stopmove", "L01_ladder", "AreaLadderSounds", 0.0, false);
}

the code confuses me a little bit, I don't know why because I don't know what I'm supposed to do in the level editor and the script at the same time! can you guys pls help :/

Can someone give me the whole code: example give me the code with everything blank, and I will fill everything myself, like the names and the functions and stuff! yeah pretty pls
(This post was last modified: 02-28-2014, 05:46 PM by Radical Batz.)
02-28-2014, 05:36 PM
Find


Messages In This Thread
How do you make a ladder go down by pulling a lever? - by Radical Batz - 02-28-2014, 05:36 PM



Users browsing this thread: 1 Guest(s)