Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
8 Directions Movement
#1
8 Directions Movement for the player:
by Dubealex
Feb 13, 2005

This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given. If you are the owner of the thread, please contact administration.


Go in game_player, and find the line:

Code:
def update

(Around line #204)

Then you will see that code neat below that line:

Code:
case Input.dir4
      when 2
        move_down
      when 4
        move_left
      when 6
        move_right
      when 8
        move_up
    end

Replace that block of code by the following:

Code:
case Input.dir8
      when 2
        move_down
      when 4
        move_left
      when 6
        move_right
      when 8
        move_up
      when 7
        move_upper_left
      when 9
        move_upper_right
      when 3
        move_lower_right
      when 1
        move_lower_left
      end

And you are done.
}




Users browsing this thread: