The RPG Maker Resource Kit

RMRK RPG Maker Creation => Requests => Script Request => Topic started by: Red Blood on September 20, 2007, 11:39:57 PM

Title: [AVAILABLE]Other Buttons To move Left,right,up,down
Post by: Red Blood on September 20, 2007, 11:39:57 PM
 :o     Okay my Left arrow Key Broke of my keyboard So im requesting Like A=left s=Down=D=right and W=Up Like In blizzards abs script please help ty
Title: Re: [REQUEST]Other Buttons To move Left,right,up,down
Post by: Falcon on September 20, 2007, 11:51:45 PM
http://rmrk.net/index.php/topic,16921.0.html

Strike One, Rule #6
Title: Re: [AVLIABLE]Other Buttons To move Left,right,up,down
Post by: Red Blood on September 21, 2007, 12:03:02 AM
Oh i put [REQUEST] cause i see everyone else doing it o.0
Title: Re: [AVLIABLE]Other Buttons To move Left,right,up,down
Post by: Falcon on September 21, 2007, 01:05:34 AM
I can understand that, but every topic after I became a mod shouldn't have that. Don't worry about it too much.

This shouldn't be too hard for a scripter, if I wasn't running linux I'd give this a shot.
Title: Re: [AVLIABLE]Other Buttons To move Left,right,up,down
Post by: Red Blood on September 21, 2007, 01:11:17 AM
I can do real basic stuff just not somtin like dat
Title: Re: [AVLIABLE]Other Buttons To move Left,right,up,down
Post by: Falcon on September 21, 2007, 01:20:13 AM
As far as scripting though, what you are asking for is VERY basic. It's just editing a conditional statement. If you use an input script, it should be easy.
Title: Re: [AVLIABLE]Other Buttons To move Left,right,up,down
Post by: modern algebra on September 21, 2007, 02:14:36 AM
Yeah, it's pretty easy. It can even be done with events. Something like this:


@>Conditional Branch: The X Button Is Being Pressed
  @>Set Move Route: Player
    :                           : Move Left  
  @>Wait: 3 Frames
@>Else
  @>Conditional Branch: The Y Button is Being Pressed
    @>Set Move Route: Player
      :                           : Move Down  
    @>Wait: 3 Frames
  @>Else
    @>Conditional Branch: The Z Button is Being Pressed
      @>Set Move Route: Player
        :                           : Move Right  
      @>Wait: 3 Frames
    @>Else
      @>Conditional Branch: The R Button is being pressed
        @>Set Move Route: Player
          :                           : Move Up  
        @>Wait: 3 Frames
      @>Branch End
    @>Branch End
  @>Branch End
@>Branch End
@>Wait: 1 Frame


At least, that will work if you have default buttons. Otherwise you might have to edit the buttons in the menu that pops up when you press F1 during Test Play.


The Scripting Solution would be similarly very easy. I will give you a hint. Movement is controlled in the update method of Game_Player and you will need to rewrite the case statement which currently controls it.
Title: Re: [AVLIABLE]Other Buttons To move Left,right,up,down
Post by: Shinami on September 21, 2007, 02:41:57 AM
I'll give you a hint too. There are keyboard scripts out there that allow the use of virtually every key on the keyboard to be used with the Input class and conditional branches. If I recall, didn't CyberSam do a keyboard script?
Title: Re: [AVLIABLE]Other Buttons To move Left,right,up,down
Post by: Falcon on September 21, 2007, 10:41:09 AM
I think he did, but I believe Near Fantastica made one, and he's an amazing scripter, so I'd use his.
Title: Re: [AVLIABLE]Other Buttons To move Left,right,up,down
Post by: modern algebra on September 21, 2007, 03:57:02 PM
Well, if he just wants to use WASD he has no need of a full keyboard input