Frictional Games Forum (read-only)

Full Version: SetEntityActive("shelf_high01_1", false); Doesnt work
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, Im trying to get it work so that when the level touches a area it triggers a function. The problem however is that when I start the map even though i checked of the "Active" thing it still is there and the script doesnt work either.
This is my script:

////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("lever_small01_1", "Sesame", "Open", true, 1);
}

void Open(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("shelf_high01_1", false);
SetEntityActive("shelf_high01_6", true);
}

////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}
StaticProp type of entities cannot be de-activated. You should change the type via model editor or use another entity.
there is another entity that looks the same =) i cant remember what category it is under, but it is an entity called secret_shelf ^_^
(05-24-2011, 10:05 PM)Simpanra Wrote: [ -> ]there is another entity that looks the same =) i cant remember what category it is under, but it is an entity called secret_shelf ^_^

I'm pretty sure it's under Entities --> Gameplay
Yeah that sounds right ^_^
You are all talking about a secret shelf but a secret shelf u open on a different way.
He doesn't wants to open a secret shelf. He just wants to make it look like it did open by disactivating the one and activating the let's say "open" one.
Teddifisk, add me on msn I've learned allot about scripting last while so I'm pretty sure I can help u

msn: ferry_hooligan@live.nl
Actually....i am right, i used the secret shelf to do exactly what he is asking...so please don't say we are wrong without knowing for sure =)

I used the secret shelf to set it inactive and then set another one active =)