Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

8 Directions to Characters and Events

Sorry my english, I speak portugues

Description: With this script changes the possibility of four to eight directions in the characters and events

Version:
2.0


Screenshots:
No need

Demo:
No need

Script:
Code:
#==============================================================================

# ** 8 Direções dos Personagens e Eventos

#------------------------------------------------------------------------------

# By Marlos Gama

#==============================================================================

 

# Personagens

class Game_Player < Game_Character

 

  alias oito_direcoes_update update

 

  def update

      unless moving? or $game_system.map_interpreter.running? or

             @move_route_forcing or $game_temp.message_window_showing

        case Input.dir8

        when 2

          move_down

        when 4

          move_left

        when 6

          move_right

        when 8

          move_up

        when 1

          move_lower_left

        when 3

          move_lower_right

        when 7

          move_upper_left

        when 9

          move_upper_right

        end

    end

    oito_direcoes_update

  end

end

 

# Eventos

class Game_Character

 

  def move_random

    case rand(8)

    when 0

      move_down(false)

    when 1

      move_left(false)

    when 2

      move_right(false)

    when 3

      move_up(false)

    when 4

      move_lower_left

    when 5

      move_lower_right

    when 6

      move_upper_left

    when 7

      move_upper_right

    end

  end

 

end

Credits:
Marlos Gama (For creating and making available)
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top