Inverted controls

hi! having some trouble right now and I was wondering if you could help me out


I'm trying to make it so that when a switch is ON, the keyboard movement controls are inverted.


I know it's been asked before, namely here:




 but (and just in case, I tried to do that on a blank project too) when I add this script


class Game_Player def move_by_input return if !movable? || $game_map.interpreter.running? move_straight(10 - Input.dir4) if Input.dir4 > 0 endend


in a script call, I get this error:


[IMG]https://40.media.tumblr.com/2508830d63f6a31394890df0324d20d0/tumblr_inline_o1d1yn6qlv1swdj8i_540.png[/IMG]


So after multiple attempts, I decided I'd try to do it with events, instead. So I made this event


[IMG]https://41.media.tumblr.com/ebf8953b350597d1d472fc256410db29/tumblr_inline_o1d21djUAF1swdj8i_540.png[/IMG]


and it all seemed to work just fine, but after a few seconds of walking around (??? and I just can't figure out why???) I get this error here:


[IMG]https://40.media.tumblr.com/cdf1cccde91b05cd53d3a458ee6ad825/tumblr_inline_o1d240qcjy1swdj8i_540.png[/IMG]


It's really frustrating, I just can't figure this out. Sorry about all the pictures, by the way.


Could someone give me a hand? Thank you
Try turning that event page with conditional branches there into a Common Event, then call the event. Let me know what happens. 
Oh wow, I had stopped hoping for a reply at this point! Thank you!! I've just tried that and... it doesn't seem to crash anymore! For now. Sometimes it does glitch a little bit... the event seems to lag a tad and the normal controls take over for a second. But well! That's not too much of a problem!


Thanks a lot!!
Oh wow, I had stopped hoping for a reply at this point! Thank you!! I've just tried that and... it doesn't seem to crash anymore! For now. Sometimes it does glitch a little bit... the event seems to lag a tad and the normal controls take over for a second. But well! That's not too much of a problem!


Thanks a lot!!



Woh, I actually helped a little! o.o Sweet! 

Although I am sorry that I wasn't able to help fully. At least the crashing's gone though, eh? 


I'm not coming up with any scripts that could work for your idea (although I kind of want to implement this in my game as well), so if I come up with anything, I'll personally message you a link. If I can somehow do it in eventing only, then I'll send you some screenshots. Until then, I wish you the best of luck my friend!

Original thread: https://forums.rpgmakerweb.com/threads/inverted-controls.55459/