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?
Cranky Old Man Offline
Posting Freak

Posts: 986
Threads: 20
Joined: Apr 2012
Reputation: 38
#7
RE: Secret Doors?

(03-06-2012, 04:31 AM)Damascus Wrote: Bumping a really old thread, but I can't seem to get my secret door to work. I have a lever called "secret_lever" and a secret door in the wall aptly named "secret_door"

In my script, I have:

Spoiler below!

void OnStart()

{
SetEntityConnectionStateChangeCallback("secret_lever", "secretdoor");
}

void secretdoor(string &in asEntity, int alState)
{
if (alState == 1)
{
SetMoveObjectState("secret_door",1.0f);
}
}

Everything is pretty much copy and pasted, but pushing the lever up or down does absolutely nothing. Have I missed some obvious step?
Here's two noob hunches from me:
Try removing the second linefeed after
void OnStart()
and try
SetMoveObjectState(asEntity,1.0f);
instead.
I'm not sure if the first suggestion changes anything, and if the second one works, don't ask me why. I think I had the same problem, but I have no idea why I can't just write "secret_door" there.


Noob scripting tutorial: From Noob to Pro

04-04-2012, 11:33 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: 2 Guest(s)