Frictional Games Forum (read-only)

Full Version: Entity is visible, even when not active
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
in my Custom Story, I have the player search for a book. Then, he has to bring it to a table to make the book in the player's hands disappear and to have an open book appear on the table ("Opening the book on the table").
For that, I have switched the open book to being inactive. However, even with a "void OnStart {}" script file (I tested it), it IS visible and collides from the beginning.
I have checked everything, and the book is neither active, nor have I forgotten to save or something.
This is probably a bug, but maybe I'm also just too stupid and missed something.
As I said, it's not possible for it to be a scripting error.
Books are static props, which are a special form of entities that are only static. so they can not be scripted. You have to take a book entity and make a new special entity that is a normal object entity.
(10-22-2010, 06:19 PM)jens Wrote: [ -> ]Books are static props, which are a special form of entities that are only static. so they can not be scripted. You have to take a book entity and make a new special entity that is a normal object entity.

Alright, I did that. It's now an object, subtype "Grab".
But now, the book doesn't appear when I want it do do so.
Here's the function:
Code:
void SolveBookPuzzle(string &in asParent, string &in asChild, int alState) {
//Activates a script area that allows the user to "read" the book
    SetEntityActive("ReadBookArea", true);
//Should make the book on the table visible, but doesn't
    SetEntityActive("SolvedSpecialBook", true);
//Makes the book the player carried to the table disappear
    SetEntityActive("specialBook", false);
    PlayMusic("bt_01_puzzle_book.ogg", false, 80, 0, 0, false);
    GiveSanityBoost();
    }
I know it works because it does everything it should do, except making "SolvedSpecialBook" visible.

EDIT: Nope, nevermind, it's just me being stupid (and not knowing how to create a functional entity). It doesn't even show when I set it to active.
Oh well, I guess I need to do it another way. Yay me.