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 Collapse
Sauron The King Offline
Junior Member

Posts: 42
Threads: 10
Joined: Oct 2011
Reputation: 0
#1
Collapse

Hello,

I am new to scripting and I wanted to make a hallway in which a part collapses.

When you enter the Zone "Collapse_Sleepingrooms", the entity "cave_in_1" will become active, a sound of crushing stones will sound ("04_rock_break.snt") and smoke will come out of the hallway.

I have made the following:

//////////////////////////////////////////////////
// Slaapkamer Geheime doorgang
void OnStart()
{
SetEntityConnectionStateChangeCallback("Lever_Sleepingroom", "func_shelf");
}


void func_shelf(string &in asEntity, int alState)
{
    if (alState == 1)
    {
    SetMoveObjectState("Shelf_Secret_Sleepingroom",1.0f);
    PlaySoundAtEntity("", "quest_completed.snt", "shelf_move_1", 0, false);
          return;
    }
}
//////////////////////////////////////////////////
// Slaapkamer boel stort in
void Onstart ()
{AddEntityCollideCallback("Player", "Collapse_Sleepingrooms", "Collidewhencollapse", "true", 1);}

{void SetEntityActive("cave_in_1", "true");}

I need to know what I have to do after this, because I won't get any further. If I test it now, I will get the following error:

.jpg   Naamloos2.jpg (Size: 43.15 KB / Downloads: 143)

Could someone help me with this?

Kind regards,
Brian


Attached Files
.jpg   Naamloos.jpg (Size: 26 KB / Downloads: 111)
10-27-2011, 11:52 PM
Find


Messages In This Thread
Collapse - by Sauron The King - 10-27-2011, 11:52 PM
RE: Collapse - by Your Computer - 10-27-2011, 11:58 PM
RE: Collapse - by Sauron The King - 10-28-2011, 09:50 AM
RE: Collapse - by flamez3 - 10-28-2011, 10:13 AM
RE: Collapse - by devin413 - 10-28-2011, 12:12 PM
RE: Collapse - by Sauron The King - 10-28-2011, 12:53 PM
RE: Collapse - by flamez3 - 10-28-2011, 01:15 PM
RE: Collapse - by devin413 - 10-28-2011, 02:44 PM
RE: Collapse - by flamez3 - 10-28-2011, 03:09 PM
RE: Collapse - by devin413 - 10-28-2011, 03:16 PM
RE: Collapse - by flamez3 - 10-28-2011, 03:27 PM
RE: Collapse - by devin413 - 10-28-2011, 06:08 PM
RE: Collapse - by Sauron The King - 10-28-2011, 06:18 PM
RE: Collapse - by devin413 - 10-28-2011, 06:22 PM
RE: Collapse - by Sauron The King - 10-30-2011, 04:00 PM
RE: Collapse - by Sauron The King - 11-02-2011, 01:38 PM



Users browsing this thread: 1 Guest(s)