05-15-2011, 05:04 PM
So I'm not very experienced in scripting but I want it so that when I pull the a lever down it moves a shelf or deactivate the current shelf and reactivate the moved shelf. It's probably easy enough but I just can't get it to work.
void OnStart()
{
SetEntityConnectionStateChangeCallback("Lever_1", "SecretShelf");
}
void SecretShelf(string &in EntityName, int alState)
{
if (alState == -1)
{
SetEntityActive("Shelf_1", false);
SetEntityActive("Shelf_2", true);
}
}
Help appreciated
void OnStart()
{
SetEntityConnectionStateChangeCallback("Lever_1", "SecretShelf");
}
void SecretShelf(string &in EntityName, int alState)
{
if (alState == -1)
{
SetEntityActive("Shelf_1", false);
SetEntityActive("Shelf_2", true);
}
}
Help appreciated