• The Eevee Expo Game Jam #10 has concluded, congratulations to all participants! Now it's time for the judges to play through the games, and you can play along to vote who deserves the community choice spotlight.
    You can check out the submitted games here!
    Play through the games and provide some feedback to the devs while you're at it!
  • Hi, Guest!
    Some images might be missing as we move away from using embedded images, sorry for the mess!
    From now on, you'll be required to use a third party to host images. You can learn how to add images here, and if your thread is missing images you can request them here.
    Do not use Discord to host any images you post, these links expire quickly!
Magnet Train Scene (Gen 3 style) (v19/v18)

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

SNR

Rookie
Member
Joined
May 6, 2021
Posts
1
SNR submitted a new resource:

Magnet Train Scene (Gen 3 style) (v19) - Provide a Scene that plays GSC Magnet Train animation, in third generation style

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...


Read more about this resource...
 

komeiji514

Elite Trainer
Member
Joined
Oct 28, 2023
Posts
255
My v21.1 port. Some simple modifications can finish it.
Ruby:
Expand Collapse Copy
class MagnetTrainScene
  def initialize(going_left, map_id, map_x, map_y, direction=2)
    pbBGMFade(1)
    @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(0.05)
    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($player.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(0.3)
    pbWait(0.6)
    $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(0.6)
    for i in 0..14
      @sprites["Black"].opacity -= 17
      pbWait(0.05)
    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(0.05)
      @sprites["Rails"].x += 6
      @sprites["Trees"].x += 6
      pbWait(0.05)
      pbWait(0.05)
      @sprites["Rails"].x += 6
      @sprites["Trees"].x += 6
      @sprites["Train"].x -= 10
      pbWait(0.05)
    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(0.05)
      @sprites["Rails"].x -= 6
      @sprites["Trees"].x -= 6
      pbWait(0.05)
      pbWait(0.05)
      @sprites["Rails"].x -= 6
      @sprites["Trees"].x -= 6
      @sprites["Train"].x += 10
      pbWait(0.05)
    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
By the way I may try to make a gen 4 style.
 
Back
Top