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
Script Help Buttons!
JenniferOrange Offline
Senior Member

Posts: 424
Threads: 43
Joined: Jun 2011
Reputation: 33
#1
Buttons!

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

Ba-da bing, ba-da boom.
11-05-2011, 07:32 PM
Find
Obliviator27 Offline
Posting Freak

Posts: 792
Threads: 10
Joined: Jul 2011
Reputation: 66
#2
RE: Buttons!

SetEntityPlayerInteractCallback can be used to interact with the button to start the timers for the lights. Smile

11-05-2011, 08:40 PM
Find
JenniferOrange Offline
Senior Member

Posts: 424
Threads: 43
Joined: Jun 2011
Reputation: 33
#3
RE: Buttons!

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?

Ba-da bing, ba-da boom.
11-05-2011, 08:51 PM
Find
Tanshaydar Offline
From Beyond

Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation: 67
#4
RE: Buttons!

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



11-06-2011, 02:15 AM
Website Find




Users browsing this thread: 1 Guest(s)