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


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Lever problem
Author Message
WLN73 Offline
Junior Member

Posts: 10
Joined: Apr 2012
Reputation: 0
Post: #1
Lever problem

Hi .... excuseme for my bad english first Blush

I have a little problem with a lever .... im tryed to turn on/off a light .... all working but the lever moves by itself from all sides .... as if trembling ...
This is the script i maked:

void OnEnter()
{
SetEntityPlayerInteractCallback("switch1", "func1", true);
}

void func1(string &in EntityName, int alState)
{
if( alState == -1)
SetLampLit("light1", false, true);
if( alState == 1)
SetLampLit("light1", true, true);
}

What did I do wrong? why the lever goes crazy???
(This post was last modified: 04-29-2012 07:36 PM by WLN73.)
04-29-2012 06:50 PM
Find all posts by this user Quote this message in a reply
JMFStorm Offline
Member

Posts: 204
Joined: Aug 2011
Reputation: 28
Post: #2
RE: Lever problem

I've had same problem sometimes. I got it fixed when I dramatically changed the position of the lever (like for example the other side of the map) -.-

04-29-2012 06:53 PM
Find all posts by this user Quote this message in a reply
jessehmusic Offline
Senior Member

Posts: 423
Joined: Dec 2011
Reputation: 8
Post: #3
RE: Lever problem

(04-29-2012 06:50 PM)WLN73 Wrote:  Hi .... excuseme for my bad english first Blush

I have a little problem with a lever .... im tryed to turn on/off a light .... all working but the lever moves by itself from all sides .... as if trembling ...
This is the script i maked:

void OnEnter()
{
SetEntityPlayerInteractCallback("switch1", "func1", true);
}

void func1(string &in EntityName, int alState)
{
if( alState == -1)
SetLampLit("light1", false, true);
if( alState == 1)
SetLampLit("light1", true, true);
}

What did I do wrong? why the lever goes crazy???
void OnEnter()
{
SetEntityPlayerInteractCallback("switch1", "func1", true);
}

void func1(string &in EntityName, int alState)
{
if( alState == -1)
SetLampLit("light1", false, true);
if( alState == 1)
SetLampLit("light1", true, true);
}


____________________________________________________

Instert this
SetLeverStuckState(string& asName, int alState, bool abEffects);

http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
04-29-2012 07:05 PM
Visit this user's website Find all posts by this user Quote this message in a reply
WLN73 Offline
Junior Member

Posts: 10
Joined: Apr 2012
Reputation: 0
Post: #4
RE: Lever problem

(04-29-2012 06:53 PM)JMFStorm Wrote:  I've had same problem sometimes. I got it fixed when I dramatically changed the position of the lever (like for example the other side of the map) -.-
Thanks....yes....now working Big Grin


(04-29-2012 07:05 PM)jessehmusic Wrote:  Instert this
SetLeverStuckState(string& asName, int alState, bool abEffects);
Thank you but with this line i can't move the lever.....
04-29-2012 07:36 PM
Find all posts by this user Quote this message in a reply
Post Reply 




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