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 I Want To Break A Ladder.
thestormcrow Offline
Junior Member

Posts: 12
Threads: 8
Joined: Apr 2013
Reputation: 0
#1
I Want To Break A Ladder.

I wanted a ladder to break as the player is climbing down it for a scare. The following is in my script file:

void OnStart()
{
AddEntityCollideCallback("Player", "LadderBreakArea", "BreakLadder", true, 1);
}

void OnEnter()
{
PlayMusic(("12_amb.ogg"), true, 1, 10, 0, false);
}

void OnLeave()
{
StopMusic(1, 0);
}

void BreakLadder(string &in asParent, string &in asChild, int alState)
{
SetPropHealth("ladder", 0);
SetEntityActive("LadderArea_1", false);
}


The ladder does not break and the ladder area doesn't deactivate til the player leaves it. Have I made some mistake/can anyone suggest a suitable workaround?
05-16-2013, 11:50 PM
Find


Messages In This Thread
I Want To Break A Ladder. - by thestormcrow - 05-16-2013, 11:50 PM
RE: I Want To Break A Ladder. - by 7heDubz - 05-17-2013, 12:19 AM
RE: I Want To Break A Ladder. - by Daemian - 05-17-2013, 12:45 AM
RE: I Want To Break A Ladder. - by palistov - 05-17-2013, 01:43 AM



Users browsing this thread: 2 Guest(s)