05-24-2011, 09:50 PM
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()
{
}
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()
{
}