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.

Pirates? How can I make a boat event sail on the water tiles?

shedt

Member

EDIT-

OK I found a script in another post by searching. Nothing helps better then a night's of sleep and a cup of coffee:

http://rmrk.net/index.php/topic,25131.0.html



I feel like an idiot. I've tried to search, and I know this must be easy to do but I can't get it to work. So I made an event, gave it a boat graphic, created on touch a battle with some pirates. I made a nice graphic that I like, the battle comes up when the player's boat touches the "pirate" ship. But the pirate ship does not sail. It does not move, even if I put on movement etc. I know it's something simple I just cannot find it. Thank you for any help.
 

poccil

Sponsor

This can be a source of confusion:  only the boat that the player is on can move in water. 

To enable that effect for other characters, edit the map_passable? method of Game_Character.  The following script does so if the character's sprite file begins with "@".  (Put this script after all others in the Materials section of the script editor.)
Code:
class Game_Character
  alias :petero_boatpassage_map_passable? :map_passable?
  def map_passable?(x, y)
    if @character_name[/^@/]
      return $game_map.boat_passable?(x,y)
    end
    return petero_boatpassage_map_passable?(x,y)
  end
end
 

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