Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with level and secret shelf
Author Message
Exostalker Offline
Member

Posts: 192
Joined: Aug 2010
Reputation: 1
Post: #1
Help with level and secret shelf
So I spawned secret shelf and lever in my map.
It's named secret_shelf and secret_lever, also secret_shelf has a script area called area_rotate, and it's added as angular offset area to secret shelf. So what I want to do is to make lever open this secret shelf, so I could use the doors. Everything seems to be set as in the original map from Amnesia, but it still gives me "unexpected ending" error, so I guess there should be some kind of error with my hps file:

void OnStart()
{
//----CONNECT CALLBACKS----//
/*Secret hole in wall
*/

ConnectEntities("shelf_connection", //Name of connection
"secret_lever", //Parent entity (Affects)
"secret_shelf", //Child entity (Affected)
false, //Invert the state sent
1, //States used (0=both), checked before invertion.
"CreateDust"); //callback

//SetMoveObjectAngularOffsetArea("secret_shelf", "rotatearea");

}

04-28-2011 07:25 PM
Find all posts by this user Quote this message in a reply
ferryadams10 Offline
Senior Member

Posts: 278
Joined: Apr 2011
Reputation: 18
Post: #2
RE: Help with level and secret shelf
it's not nessecary to write it down like that you could just do it like this as well

//----CONNECT CALLBACKS----//
/*Secret hole in wall
*/

ConnectEntities("shelf_connection", "secret_lever", "secret_shelf", false, 1, (0=both), "CreateDust");

//SetMoveObjectAngularOffsetArea("secret_shelf", "rotatearea");
}

what u've got right now is just copied from the original game out of old_archives.hps

Big Grin

Got a nice sofa
Please come and have a seat for a while

04-29-2011 10:55 AM
Find all posts by this user Quote this message in a reply
Exostalker Offline
Member

Posts: 192
Joined: Aug 2010
Reputation: 1
Post: #3
RE: Help with level and secret shelf
(04-29-2011 10:55 AM)ferryadams10 Wrote:  it's not nessecary to write it down like that you could just do it like this as well

//----CONNECT CALLBACKS----//
/*Secret hole in wall
*/

ConnectEntities("shelf_connection", "secret_lever", "secret_shelf", false, 1, (0=both), "CreateDust");

//SetMoveObjectAngularOffsetArea("secret_shelf", "rotatearea");
}

what u've got right now is just copied from the original game out of old_archives.hps

Big Grin

Well it just seems that I forgot to add onEnter and onLeave...

The one you posted still crashes with a lot of errors... I guess this isn't right :
Quote: , (0=both),
Smile

04-29-2011 02:09 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)