Sabrak
Junior Member
Posts: 7
Threads: 3
Joined: Jul 2013
Reputation:
0
|
Help please
Hello everyone i need a little help here. I am creating a secret way with closet (when player press button, the shelf will "move away"). So i created one shelf with some things (books, golden statue and some other things) and one same but not active. Later i made script Quote:void OnStart()
{
//////////Button//////////
SetEntityPlayerInteractCallback("Button", "Secret", true);
}
//////////Secret patch//////////
void Secret(string &in asEntity)
{
SetEntityActive("shelf_high01_1", false);
SetEntityActive("book_row03_4", false);
SetEntityActive("book_row03_5", false);
SetEntityActive("book_row03_6", false);
SetEntityActive("book_row03_3", false);
SetEntityActive("book_row03_2", false);
SetEntityActive("book_row03_1", false);
SetEntityActive("paperpile01_1", false);
SetEntityActive("paperpile01_2", false);
SetEntityActive("genie_bottle_1", false);
SetEntityActive("book_pile01_2", false);
SetEntityActive("book_row03_11", false);
SetEntityActive("book_row03_10", false);
SetEntityActive("arabic_statue_gold_1", false);
SetEntityActive("book_row03_7", false);
SetEntityActive("book_row03_8", false);
SetEntityActive("book_row03_9", false);
SetEntityActive("shelf_high01_2", true);
SetEntityActive("book_row03_19", true);
SetEntityActive("book_row03_23", true);
SetEntityActive("book_row03_24", true);
SetEntityActive("book_row03_20", true);
SetEntityActive("book_row03_21", true);
SetEntityActive("book_row03_22", true);
SetEntityActive("paperpile01_3", true);
SetEntityActive("paperpile01_4", true);
SetEntityActive("genie_bottle_2", true);
SetEntityActive("book_pile01_3", true);
SetEntityActive("book_row03_25", true);
SetEntityActive("book_row03_29", true);
SetEntityActive("arabic_statue_gold_2", true);
SetEntityActive("book_row03_26", true);
SetEntityActive("book_row03_27", true);
SetEntityActive("book_row03_28", true);
SetEntityActive("Billboard_76", false);
SetEntityActive("Billboard_74", false);
PlaySoundAtEntity("Mechanism1", "move_gate", "Button", 0, false);
AddTimer("", 5.0f, "Stop");
}
//////////Stop button sound//////////
void Stop(string &in asTimer)
{
StopSound("Mechanism1", 2.0f);
}
void OnEnter()
{
}
void OnLeave()
{
}
but only entity that changes is golden statue and "genie bottle ". Where i made mistake? (Sorry for my english xD)
(This post was last modified: 08-29-2013, 05:01 PM by Sabrak.)
|
|