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.

Transfer Player Question

Hey guys.

Imagine you have these events that follow you around when you touch something, but they are standing in their places, quietly and not bothering anyone if you don't touch that thing. If these events touch you, you'll be sent again to the beggining of the map.

The problem here is that when you're sent to the beggining of the map, the events are still following you, instead of quietly returning to their places.

I'm doing this with a parallel process event (the untouchable place) and the following with a common event. But, I don't know what I'm doing wrong.

Can you guys help me?
 
Let's see, how exactly are you setting this up? What's the problem, you don't know how to event them back to their original positions or they don't stop following you?

And is this XP or VX?
 

poccil

Sponsor

The problem here is that you're trying to transfer from one map to the same map.  Normally, the map is reinitialized only if the new map is different from the current map.  To prevent this, you must use a script.  The following script below modifies the perform_transfer function.  Put it after all other scripts in the Materials section of the script editor.
Code:
class Game_Player
  def perform_transfer
    return unless @transferring
    @transferring = false
    set_direction(@new_direction)
    # Change 15 in the line below to any switch number to force reinitializing the map
    if $game_map.map_id != @new_map_id || $game_switches[15]
      $game_map.setup(@new_map_id)     # Move to other map
    end
    moveto(@new_x, @new_y)
  end
end

After installing that script, set switch 15 (or the switch number you chose) to ON before the Transfer Player event command.  You can set it to OFF afterwards.
 

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