Frictional Games Forum (read-only)

Full Version: movable books
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was wondering if there were any tutorials for this? I can't seem to find any ( judging by how I missed the roman numeral props, I'm probably just too stupid to find it. ) Right now I'm trying to use


////////////////////////////
// Run when entering map
void OnEnter()
{
SetEntityPlayerInteractCallback("bookmoveg", "trapopen", true);
}

void SetMoveObjectState(string &in item)
{
SetPropHealth("barrier", 0);
SetEntityActive("barrier", false);
}
////////////////////////////
// Run when leaving map
void OnLeave()
{

}

to cause the movable book to destroy a barrier keeping a hatch closed, but it ain't working. I checked the engine scripts page on the wiki but theres nothing relevant to the book.
Change

void SetMoveObjectState(string &in item)

to

void trapopen(string &in item)