Frictional Games Forum (read-only)
SetEntityActive("shelf_high01_1", false); Doesnt work - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: SetEntityActive("shelf_high01_1", false); Doesnt work (/thread-8225.html)



SetEntityActive("shelf_high01_1", false); Doesnt work - Henriksen - 05-24-2011

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()
{

}


RE: SetEntityActive("shelf_high01_1", false); Doesnt work - Tanshaydar - 05-24-2011

StaticProp type of entities cannot be de-activated. You should change the type via model editor or use another entity.


RE: SetEntityActive("shelf_high01_1", false); Doesnt work - Simpanra - 05-24-2011

there is another entity that looks the same =) i cant remember what category it is under, but it is an entity called secret_shelf ^_^


RE: SetEntityActive("shelf_high01_1", false); Doesnt work - Kyle - 05-25-2011

(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


RE: SetEntityActive("shelf_high01_1", false); Doesnt work - Simpanra - 05-25-2011

Yeah that sounds right ^_^


RE: SetEntityActive("shelf_high01_1", false); Doesnt work - ferryadams10 - 05-25-2011

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


RE: SetEntityActive("shelf_high01_1", false); Doesnt work - Simpanra - 05-25-2011

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 =)