IMUNME 3 Posted October 7, 2015 Hello guys, Can anyone tell me how to script a condition for this def? def switch if @id == 1 $game_switches[13] = false $game_switches[19] = false $game_switches[20] = true $game_temp.reserve_common_event(3) switch_player(2) else $game_switches[19] = true $game_switches[20] = false $game_temp.reserve_common_event(3) switch_player(1) end end I want to prevent the def switch from happening if any direction keys is pressed down. I'm looking for something like a condition branch that would keep going with the script if no arrow is being held down and would do nothing if any direction key is held down. Thank you in advance! FM Share this post Link to post Share on other sites
Tsukihime 1,489 Posted October 7, 2015 (edited) Input.dir4 == 0 Input.dir8 == 08-dir is preferred since if they were pressing two keys down you would detect it as well. Edited October 7, 2015 by Tsukihime Share this post Link to post Share on other sites
IMUNME 3 Posted October 7, 2015 Very nice! Thanks a lot! You really know your stuff. Who best to answer this post! Cheers! FM Share this post Link to post Share on other sites