Frictional Games Forum (read-only)

Full Version: Buttons!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Oh my god buttons are so complicated. xD
I want to make it so the player clicks the button, then a nearby light turns on flickering, then stops. I know I need timers for flickering, but as far as touching the button to turn the light on I'm clueless. Could anyone be nice enough as to give me an example script? Thank you Smile
SetEntityPlayerInteractCallback can be used to interact with the button to start the timers for the lights. Smile
So I guess something like SetEntityPlayerInteractCallback("button_1", "Light", true); ?
and I noticed SetEntityConnectionStateChangeCallback is used for levers to open things, should I do the same for the button?
(11-05-2011, 08:51 PM)JenniferOrange Wrote: [ -> ]So I guess something like SetEntityPlayerInteractCallback("button_1", "Light", true); ?

and I noticed SetEntityConnectionStateChangeCallback is used for levers to open things, should I do the same for the button?

If it's a button entity, you can and should do so.