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
#13
RE: Collapse

Thanks folks it's working now Big Grin
I have added the sound and the shaking camera.
This is how it looks now:
//////////////////////////////////////////////////
// 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 OnEnter()
{
AddEntityCollideCallback("Player", "Collapse_Sleepingrooms", "Collidewhencollapse", true, 1);
}

void Collidewhencollapse(string &in asParent, string &in asChild, int alState)
{SetEntityActive("cave_in_1", true);
StartScreenShake(0.5, 2, 1, 2);
PlaySoundAtEntity("Cave_in", "04_rock_break.snt", "Player", 0, true);
}

If I come across another problem, I will post it right here in this topic.
Thanks for the great help and tips! Angel
10-28-2011, 06:18 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)