• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • Eevee Expo's webhost has been having technical issues since Nov. 20th and you might be unable to connect to our site. Staff are also facing issues connecting, so please send a DM to Cat on-site or through Discord directly for faster service!
Magnet Train Scene (Gen 3 style) (v19/v18)

Magnet Train Scene (Gen 3 style) (v19/v18) 1.0.0

Pokémon Essentials Version
v19 ➖
This script adds a scene like the Magnet Train animation in GSC or HGSS but with RSE/FRLG style. It's based on PurpleZaffre's RSE Cable Car Scene.

They are 2 animations variants :

  • Going left
  • Going right

And also time based tones and backgrounds changes (night background, afternoon/evening background, and default day background).

This is an example, going left in afternoon :



To install this, download the resource zip, extract the files.
  • Put MagnetTrain.ogg in Audio/BGM directory, it's a remixed version of HGSS Magnet Train jingle I've made.
  • Put the graphics in Graphics/Pictures/MagnetTrain

- Put the script above Main.

Script:
Expand Collapse Copy
#==============================================================================#
#                               Magnet Train Scene                             #
#                                    by SNR                                    #
#                  based on PurpleZaffre's RSE Cable Car Scene                 #
#==============================================================================#
#                                Instructions                                  #
#                                                                              #
# To call the scene, just put                                                  #
# MagnetTrainScene.new(going_left, map_id, map_x, map_y, direction)            #
# in an event.                                                                 #
#                                                                              #
# The arguments are:                                                           #
# going_up - If true, the train will go left. If false, the car will go right. #
# map_id - The ID of the map where the player will appear after the scene.     #
# map_x - The X coordinate on the map where the player will appear.            #
# map_y - The Y coordinate on the map where the player will appear.            #
# direction - The direction you want the player to be facing when the scene    #
# finishes. If this field is left empty, it will always assume 2 (down). The   #
# input received should be one of the following:                               #
# 2 - down                                                                     #
# 4 - left                                                                     #
# 6 - right                                                                    #
# 8 - up                                                                       #
#                                                                              #
# An example: MagnetTrainScene.new(false, 294, 22, 38, 8)                      #
# In this example, the train is going right, and the player will then appear   #
# in the map with ID 294, in the coordinates 22(X) 38(Y) and facing up.        #
#==============================================================================#
#                               Configurations                                 #
#                                                                              #
#                                                                              #
# Change this to what you want the background music to be when playing the     #
# scene. Must be located in the folder Audio/BGM.                              #
MAGNET_TRAIN_BGM = "MagnetTrain"                                               #      
#                                                                              #
# Tones applied to Pictures (except Train) in function of daytime              #
MORNING_TONE =  Tone.new(-40, -50, -35, 50)   # Morning                        #
DAY_TONE =  Tone.new(  0,   0,   0,  0)       # Day                            #
AFTERNOON_TONE =  Tone.new(  0,   0,   0,  0) # Afternoon                      #
EVENING_TONE =  Tone.new(-15, -60, -10, 20)   # Evening                        #
NIGHT_TONE =  Tone.new(-70, -90,  15, 55)     # Night                          #
#==============================================================================#
#                    Please give credit when using this.                       #
#==============================================================================#


class MagnetTrainScene
  def initialize(going_left, map_id, map_x, map_y, direction=2)
    pbBGMFade(10)
    @sprites = {}
    @sprites["Black"] = Sprite.new
    @sprites["Black"].bitmap = Bitmap.new("Graphics/Pictures/MagnetTrain/black")
    @sprites["Black"].z = 99999
    @sprites["Black"].opacity = 0
    for i in 0..14
      @sprites["Black"].opacity += 17
      pbWait(1)
    end
    pbBGMPlay(MAGNET_TRAIN_BGM)
    @sprites["BG"] = Sprite.new
    @sprites["BG"].bitmap = Bitmap.new("Graphics/Pictures/MagnetTrain/bg" + ((PBDayNight.isNight?) ? "_night" : (PBDayNight.isEvening? || PBDayNight.isAfternoon? ? "_afternoon" : "")))
    @sprites["BG"].tone = get_current_tone
    @sprites["BG"].y = -98
    @sprites["BG"].z = 90000
    @sprites["Rails"] = Sprite.new
    @sprites["Rails"].bitmap = Bitmap.new("Graphics/Pictures/MagnetTrain/rails")
    @sprites["Rails"].tone = get_current_tone
    @sprites["Train"] = Sprite.new
    @sprites["Train"].bitmap = Bitmap.new($Trainer.female? ? "Graphics/Pictures/MagnetTrain/train_female" : "Graphics/Pictures/MagnetTrain/train_male")
    @sprites["Trees"] = Sprite.new
    @sprites["Trees"].bitmap = Bitmap.new("Graphics/Pictures/MagnetTrain/trees")
    @sprites["Trees"].tone = get_current_tone

    if going_left
      go_left
    else
      go_right
    end
    @sprites["BG"].dispose
    @sprites["Rails"].dispose
    @sprites["Train"].dispose
    @sprites["Trees"].dispose
    pbBGMFade(30)
    pbWait(60)
    $game_player.transparent = false
    $game_temp.player_transferring = true
    $game_temp.player_new_map_id = map_id
    $game_temp.player_new_x = map_x
    $game_temp.player_new_y = map_y
    $game_temp.player_new_direction = direction
    pbBGMStop(0)
    pbWait(5)
    for i in 0..14
      @sprites["Black"].opacity -= 17
      pbWait(1)
    end
    pbDisposeSpriteHash(@sprites)
    $game_map.autoplay
  end

  def go_left

    @sprites["Rails"].x = -1536
    @sprites["Rails"].y = 120
    @sprites["Rails"].z = 92000
    @sprites["Train"].x = 420
    @sprites["Train"].y = 230
    @sprites["Train"].z = 96000
    @sprites["Trees"].x = -1536
    @sprites["Trees"].y = 360
    @sprites["Trees"].z = 96200
    for i in 0..30
      if i < 4
        @sprites["Black"].opacity -= 50
      elsif i == 4
        @sprites["Black"].opacity -= 55
      elsif i >= 26 && i < 30
        @sprites["Black"].opacity += 50
      elsif i == 30
        @sprites["Black"].opacity += 55
      end
      @sprites["Train"].x -= 10
      pbWait(2)
      @sprites["Rails"].x += 6
      @sprites["Trees"].x += 6
      pbWait(2)
      pbWait(2)
      @sprites["Rails"].x += 6
      @sprites["Trees"].x += 6
      @sprites["Train"].x -= 10
      pbWait(2)
    end
  end

  def go_right
    @sprites["Rails"].x = 0
    @sprites["Rails"].y = 120
    @sprites["Rails"].z = 92000
    @sprites["Train"].x = -256
    @sprites["Train"].y = 230
    @sprites["Train"].z = 96000
    @sprites["Trees"].x = 0
    @sprites["Trees"].y = 360
    @sprites["Trees"].z = 96200
    for i in 0..30
      if i < 4
        @sprites["Black"].opacity -= 50
      elsif i == 4
        @sprites["Black"].opacity -= 55
      elsif i >= 26 && i < 30
        @sprites["Black"].opacity += 50
      elsif i == 30
        @sprites["Black"].opacity += 55
      end
      @sprites["Train"].x += 10
      pbWait(2)
      @sprites["Rails"].x -= 6
      @sprites["Trees"].x -= 6
      pbWait(2)
      pbWait(2)
      @sprites["Rails"].x -= 6
      @sprites["Trees"].x -= 6
      @sprites["Train"].x += 10
      pbWait(2)
    end
  end

  def get_current_tone
    if PBDayNight.isNight?
      return NIGHT_TONE
    elsif PBDayNight.isMorning?
      return MORNING_TONE
    elsif PBDayNight.isEvening?
      return MORNING_TONE
    elsif PBDayNight.isAfternoon?
      return AFTERNOON_TONE
    else
      return DAY_TONE
    end
  end
end


Instructions for usage are writted in script comments.

I hope you will enjoy this script!
Credits
PurpleZaffre for RSE Cable Car Scene.
new001 for Magnet Train rip
SNR
Author
SNR
Downloads
857
Views
2,935
First release
Last update

Ratings

5.00 star(s) 2 ratings

Latest reviews

this worked perfectly for me as I'm using version 18.1. Thanks
Really cool scene and the song is well made :) I tested in on v18 and it also works there :D
Back
Top