06-22-2013, 07:36 PM
You need to first check if the button is pressed (regardless of the switch).
THEN... you toggle based on the current switch condition:
And as MechanicalPen stated, remove the 'p'/print statement lines when you're satified.
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
![[Image: QrnbKlx.jpg]](https://i.imgur.com/QrnbKlx.jpg)
![[Image: sGz1ErF.png]](https://i.imgur.com/sGz1ErF.png)
![[Image: liM4ikn.png]](https://i.imgur.com/liM4ikn.png)
![[Image: fdzKgZA.png]](https://i.imgur.com/fdzKgZA.png)
![[Image: sj0H81z.png]](https://i.imgur.com/sj0H81z.png)
![[Image: QL7oRau.png]](https://i.imgur.com/QL7oRau.png)
![[Image: uSqjY09.png]](https://i.imgur.com/uSqjY09.png)
![[Image: GAA3qE9.png]](https://i.imgur.com/GAA3qE9.png)
![[Image: 2Hmnx1G.png]](https://i.imgur.com/2Hmnx1G.png)
![[Image: BwtNdKw.png%5B]](https://i.imgur.com/BwtNdKw.png%5B)