Frictional Games Forum (read-only)

Full Version: Why the hell wont this work?!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("LeverExit" , "ShelfDestroyer" , "OpentheExit" , true , 1);
}

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

}

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

}
////////////////////////////
// Actual functions

void OpentheExit(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("SHELF", false);
PlaySoundAtEntity("", "levelexitopen.snt", "LeverExit", 0.5f, false);
}

====================================================
Help, I am freaking out! Angry
The Shelf didn't dissapear!
(12-09-2011, 03:30 PM)Brute Wrote: [ -> ]////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("LeverExit" , "ShelfDestroyer" , "OpentheExit" , true , 1);
}

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

}

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

}
////////////////////////////
// Actual functions

void OpentheExit(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("SHELF", false);
PlaySoundAtEntity("", "levelexitopen.snt", "LeverExit", 0.5f, false);
}

====================================================
Help, I am freaking out! Angry
The Shelf didn't dissapear!
Some entities don't deactivate in amnesia. Such as the desk and tables.
Some entities cannot be set to SetEntityActive = false. You can circumvent this by opening the shelf in ModelEditor and set the "static" to "Object + static". Then save it as a new .ent file. Place that new entity instead of the shelf and you should be set to go.
(12-09-2011, 03:45 PM)Acies Wrote: [ -> ]Some entities cannot be set to SetEntityActive = false. You can circumvent this by opening the shelf in ModelEditor and set the "static" to "Object + static". Then save it as a new .ent file. Place that new entity instead of the shelf and you should be set to go.
Thanks, handy to know if I need something like that done. ^^
Oh my goodness! Are you guys kidding me??? XD
So many hours, just to knowing THIS?!

Thanks guys, it work now! Smile