10-27-2011, 11:52 PM
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:
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:
[attachment=2161]
Could someone help me with this?
Kind regards,
Brian
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:
Code:
//////////////////////////////////////////////////
// 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:
[attachment=2161]
Could someone help me with this?
Kind regards,
Brian