My plug-in doesn't work in the second map

Hi! I was using HC_FloatingPlayerText for a while, but then, I added a teleportation to the second map. And know the plug-in doesn’t work on this second map. I made several tests and the problem is the teleportation. How can I solve it?

I’m wondering if it’s the transfer itself or something about map 2. Could you set the player’s starting position on map 2 and test play from there? If the text shows up when you start on map 2, then it’s the transfer that’s breaking it. If it still doesn’t show, it might be something on map 2, like the event that runs the ShowPlayerText command only being on map 1.

Also, after you teleport, press F8 and check the Console tab for any red errors, and let us know which version of the plugin you have and whether you’re on MV or MZ. That should help narrow it down.

I’m using MV version. And I have no problem with the plug-in when I starts in map 2. But if I add a teleportation to map 1 the floating text desapears

From what I can see in the plugin, it makes its text layer once on the first map and keeps reusing it, so after a transfer the text is still being drawn on the old map. Opening the menu and closing it would probably do the same thing.

Try this small add on. Save it as HC_FloatingPlayerTextFix.js in your plugins folder and put it directly below HC_FloatingPlayerText in the plugin list:

/*:
 * @target MV
 * @plugindesc Keeps HC_FloatingPlayerText working after map transfers. Place below it.
 */
(function() {
  var _createLowerLayer = Spriteset_Map.prototype.createLowerLayer;
  Spriteset_Map.prototype.createLowerLayer = function() {
    HC_FloatingText._layer = null;
    HC_FloatingText._sprites.length = 0;
    _createLowerLayer.call(this);
  };
})();

Thank you so much! The problem was solved