Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Activate Switch with a button
#1
Brick 
Hi! I'm using a mini-map that it's triggered by a switch, so I'm trying to turn the switch on and off when pressing a button, however, I don't know much about Ruby and I'm probably missing something (maybe some kind of break to prevent the conditional from looping?)
The code I wrote is as follows:


Code:
if Input.trigger?(Input::L)
if $game_switches[2] = false    
$game_switches[2] = true    
end
if $game_switches[2] = true  
$game_switches[2] = false
end
end


I would appreciate if someone has the time to tell me what I'm doing wrong or missing! Thanks before hand =)
I'm looking for a scripter to help me with my proyect. Need some minor adjustments-modifications and some larger codes. The larger ones will be remunerated :) Thanks beforehand.
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

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



Users browsing this thread: