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
#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


Messages In This Thread
Lever that controls door or hatch! - by tkmatty - 09-17-2010, 06:20 PM
RE: Lever that controls door or hatch! - by tkmatty - 09-18-2010, 09:33 AM



Users browsing this thread: 1 Guest(s)