8 Directions Movement PDF Print E-mail
User Rating: / 0
PoorBest 
Written by Dubealex   
Go in game_player, and find the line:
def update

(Around line #204)

Then you will see that code neat below that line:

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:

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.

Comments (0)add
Write comment

busy
Last Updated on Sunday, 02 March 2008 05:18