Frictional Games Forum (read-only)

Full Version: Lever problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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???
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: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);


(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.....