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
Lever that controls door or hatch!
tkmatty Offline
Junior Member

Posts: 2
Threads: 1
Joined: Sep 2010
Reputation: 0
#1
Lever that controls door or hatch!

Simple question: how do I script the lever/button etc, to open a door/hatch ??
09-17-2010, 06:20 PM
Find
theDARKW0LF Offline
Member

Posts: 150
Threads: 17
Joined: Sep 2010
Reputation: 0
#2
RE: Lever that controls door or hatch!

I'd like to know the same, someone able to assist?

Check out my custom stories(1)(2)!
09-18-2010, 12:18 AM
Find
swat1cat Offline
Junior Member

Posts: 9
Threads: 1
Joined: Sep 2010
Reputation: 0
#3
RE: Lever that controls door or hatch!

(09-18-2010, 12:18 AM)theDARKW0LF Wrote: I'd like to know the same, someone able to assist?

06_distillery.map has a crank that opens a hatch - I would check that level and see how they did it.
09-18-2010, 12:51 AM
Find
tkmatty Offline
Junior Member

Posts: 2
Threads: 1
Joined: Sep 2010
Reputation: 0
#4
RE: Lever that controls door or hatch!

Ok ive found something out by checking scrips from other maps.
I need to name my controller, in this case it's elevator_lever_1. I named it in the ConnectionStateChangeCallback (CSCC) as Lever1 then the script should go something like this:

//Function: ConnectionStateChangeCallback
void Lever1(string &in asEntity, in alState)
{
//If the lever is pulled max up or down then open hatch_metal01_1
if(alState == 1 or alState == -1)
{
//NO idea what to script here.. i know it should be some kind of code "if" lever is in some state it should activate the hatch to open "false or true" depends on the value on the lever.
}
}

one extra question: can I put this script anywhere in my deafault script or does it need a specific place to be? thanks
As for the question over I think it's an interresting topic for noobs like meWink
09-18-2010, 09:33 AM
Find




Users browsing this thread: 1 Guest(s)