Activate Switch with a button
#8
You need to first check if the button is pressed (regardless of the switch).
THEN... you toggle based on the current switch condition:
Code:
if Input.trigger?(Input::L)
  if $game_switches[2] = false
    p "on"
    $game_switches[2] = true
  else
    p "off"
    $game_switches[2] = false
  end
end
And as MechanicalPen stated, remove the 'p'/print statement lines when you're satified.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }


Messages In This Thread
Activate Switch with a button - by Iqus - 06-18-2013, 07:16 PM
RE: Activate Switch with a button - by Iqus - 06-19-2013, 12:13 PM
RE: Activate Switch with a button - by Iqus - 06-19-2013, 08:30 PM
RE: Activate Switch with a button - by DerVVulfman - 06-22-2013, 07:36 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
   How can i activate switches with rgss computerwizoo7 2 7,427 07-04-2009, 03:01 AM
Last Post: computerwizoo7



Users browsing this thread: 1 Guest(s)