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 problem
WLN73 Offline
Junior Member

Posts: 10
Threads: 3
Joined: Apr 2012
Reputation: 0
#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
JMFStorm Offline
Member

Posts: 205
Threads: 8
Joined: Aug 2011
Reputation: 28
#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
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#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
Website Find
WLN73 Offline
Junior Member

Posts: 10
Threads: 3
Joined: Apr 2012
Reputation: 0
#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




Users browsing this thread: 1 Guest(s)