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
Secret Doors?
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#4
RE: Secret Doors?

(01-11-2012, 07:40 AM)Tripication Wrote:
(01-11-2012, 07:17 AM)flamez3 Wrote:
Quote:SetMoveObjectState(string& asName, float afState);


Moves an object to a certain state.
asName - internal name
afState - state of the object, 0 = closed, 1 = open, values inbetween are valid too!
Taken from http://wiki.frictionalgames.com/hpl2/amn...ons#player

Here's how I would script it:

Quote:void OnStart()
{
SetEntityConnectionStateChangeCallback("lever1", "secretdoor");

}

void secretdoor(string &in asEntity, int alState)
{
if (alState == -1)
{
SetMoveObjectState("name_of_wall", 1);
}
}
Ok, i got the first bit, with the lever and the function, but i have a question or two.

if (alState == -1) - I shouldn't need to edit this line should I, and is -1 the lever when its down?

SetMoveObjectState("name_of_wall", 1); - Im using a moving bookshelf, but im leaving the wall there so that the shelf moves but the wall doesn't?


and how would i identify what direction the shelf_secret_door should move?
I thought you were just doing a secret door. Ok; With the lever, I'm not exactly sure what number is down (could be 1 or -1). You don't need to edit it. SetMoveObjectState would only work on the wall. A moving bookshelf is a different script.

I'll link you to a page that will help you with the bookshelf: http://wiki.frictionalgames.com/hpl2/tut...cretshelfs

How do you plan on making the secret wall opening if you are using a lever to open the shelf?


01-11-2012, 07:48 AM
Find


Messages In This Thread
Secret Doors? - by Tripication - 01-11-2012, 07:14 AM
RE: Secret Doors? - by flamez3 - 01-11-2012, 07:17 AM
RE: Secret Doors? - by Tripication - 01-11-2012, 07:40 AM
RE: Secret Doors? - by flamez3 - 01-11-2012, 07:48 AM
RE: Secret Doors? - by Tripication - 01-11-2012, 07:57 AM
RE: Secret Doors? - by Damascus - 03-06-2012, 04:31 AM
RE: Secret Doors? - by Cranky Old Man - 04-04-2012, 11:33 AM
RE: Secret Doors? - by SilentStriker - 04-04-2012, 09:41 PM
RE: Secret Doors? - by Cranky Old Man - 04-05-2012, 12:28 AM
RE: Secret Doors? - by SilentStriker - 04-05-2012, 07:42 AM
RE: Secret Doors? - by Cranky Old Man - 04-05-2012, 09:05 AM
RE: Secret Doors? - by SilentStriker - 04-05-2012, 09:27 AM



Users browsing this thread: 1 Guest(s)