Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Entity is visible, even when not active
ThePaSch Offline
Member

Posts: 108
Threads: 11
Joined: Sep 2010
Reputation: 0
#1
Entity is visible, even when not active

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.
10-22-2010, 05:43 PM
Find
jens Offline
Frictional Games

Posts: 4,093
Threads: 199
Joined: Apr 2006
Reputation: 202
#2
RE: Entity is visible, even when not active

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
Website Find
ThePaSch Offline
Member

Posts: 108
Threads: 11
Joined: Sep 2010
Reputation: 0
#3
RE: Entity is visible, even when not active

(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:
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.
10-22-2010, 06:51 PM
Find




Users browsing this thread: 1 Guest(s)