Like through an event command? I am doing this mechanic where the player moves through space over a long distance, and it looks odd for his shadow to travel with him even though he is not over ground. But I need the shadow to come back after he moves. I am using Visu Stella if this matters.
Can I remove the player shadow temporarily?
RPG Maker MZ SupportBy default, the player doesn't have a shadow. It's being added by one of your plugins. The method to remove it depends on which plugin is adding the shadows.
Since you mentioned VisuStella, I'm going to assume that VisuStella Events and Movement Core is the culprit. That plugin doesn't have a built-in way to disable only the player's shadow at runtime. I have found a solution that seems to work, but it will only remove the player's shadow while you remain on the same map. If you change maps, or enter battle, the shadow will come back. If that's not a problem, then here is how it's done:
To remove the shadow, run this through a script command:
To restore the shadow, run this through a script command:
Since you mentioned VisuStella, I'm going to assume that VisuStella Events and Movement Core is the culprit. That plugin doesn't have a built-in way to disable only the player's shadow at runtime. I have found a solution that seems to work, but it will only remove the player's shadow while you remain on the same map. If you change maps, or enter battle, the shadow will come back. If that's not a problem, then here is how it's done:
To remove the shadow, run this through a script command:
JavaScript:
// Remove player shadow
const playerSprite = SceneManager._scene._spriteset._characterSprites?.find(sprite => sprite._character === $gamePlayer);
if (playerSprite) {
const shadowSprite = playerSprite._shadowSprite;
SceneManager._scene._spriteset._tilemap.removeChild(shadowSprite);
shadowSprite.destroy();
playerSprite._shadowSprite = null;
}
To restore the shadow, run this through a script command:
JavaScript:
// Restore player shadow
const playerSprite = SceneManager._scene._spriteset._characterSprites?.find(sprite => sprite._character === $gamePlayer);
if (playerSprite) {
SceneManager._scene._spriteset.createCharacterShadow(playerSprite);
}
If I wanted to do the same thing but with the followers shadows as well as the player how would that go?
@Edward Hood , please refrain from necro-posting in a thread. Necro-posting is posting in a thread that has not had posting activity in over 30 days. You can review our forum rules here. Thank you.
Original thread: https://forums.rpgmakerweb.com/threads/can-i-remove-the-player-shadow-temporarily.157599/