Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> Some small scripting problem [Solved]
Vexus
post Apr 14 2012, 02:45 AM
Post #1


Level 19
Group Icon

Group: Revolutionary
Posts: 398
Type: Mapper
RM Skill: Intermediate




I'm editing Game_Player movement and with the help on google search I managed to make the character move using wasd instead of the arrow keys.

Now I was wondering if I could take it into a "higher level" but trying to make it if you press arrow key up OR w character moves up.

So anyone could help me with a little problem?

These are the lines of the script:

The default with arrow keys movement.
CODE
      
case Input.dir4
      when 2
        move_down
      when 4
        move_left
      when 6
        move_right
      when 8
        move_up
      #end


And this is the wasd part.
CODE
      if Input.press?(Input::Y)
         move_down
      elsif Input.press?(Input::X)
         move_left
      elsif Input.press?(Input::Z)
         move_right
      elsif Input.press?(Input::R)
         move_up
      end
    end


Thanks.

This post has been edited by Vexus: Apr 14 2012, 06:08 AM


__________________________
Current Project/s:
Go to the top of the page
 
+Quote Post
   

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 19th June 2013 - 09:38 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker