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.

I really need help whit simple thing..

Status
Not open for further replies.

Jared

Member

Code:
class Game_Actors
  def each
    @data.each {|d| yield d if d}
  end
end
class Scene_Gameover
  HOME_ID = 1 #The Map-ID of your home
  HOME_X = 9 #X-Coordinate for Home-teleport
  HOME_Y = 6 #Y-Coordinate for Home-teleport
  HOME_DIR = 2 #Direction for Home-teleport
  def update
    # If C button was pressed
    if Input.trigger?(Input::C)
      #heal party
      $game_actors.each {|actor| actor.recover_all}
      $game_temp.gameover = false
      #teleport home
      $game_map.setup(HOME_ID)
      $game_player.moveto(HOME_X, HOME_Y)
      case HOME_DIR
        when 2 then $game_player.turn_down
        when 4 then $game_player.turn_left
        when 6 then $game_player.turn_right
        when 8 then $game_player.turn_up
      end
      $scene = Scene_Map.new
    end
  end
end
 
This topic has been resolved. If Slaaperz or any other users have any questions or further problems regarding this topic, please create a new thread about them.

Thank you!
 
Status
Not open for further replies.

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