In GALV ActionIndicator, I can add an icon above the relevant event as a comment, but is there a way to add the icon above the player and not the event? Or do I need to use another plugin?
MZ [Solved] How to add an icon above the player with GALV Action Indicator
RPG Maker MZ SupportIf possible, use the comment command too, so that it activates automatically.
So did you mean add the icon on top of player when they're facing the commented event?
Then you can open the plugin file with notepad and change the code like this in the update method (I commented out the original lines with // here) [edit: that middle commentY didn't fit the second line here it seems, but it's part of the 2nd original line]:
Then you can open the plugin file with notepad and change the code like this in the update method (I commented out the original lines with // here) [edit: that middle commentY didn't fit the second line here it seems, but it's part of the 2nd original line]:
// this.x = $gameMap.event($gamePlayer.actionIconTarget.eventId).screenX() + this._offsetX + commentX;// this.y = $gameMap.event($gamePlayer.actionIconTarget.eventId).screenY() + this._offsetY + this._float + commentY; this.x = $gamePlayer.screenX() + this._offsetX + commentX; this.y = $gamePlayer.screenY() + this._offsetY + this._float + commentY;oh thanks you, it works perfectly !
The last little problem I have is that the icon appears immediately when I press the arrow key to move to the tile associated with the event, and not when I arrive at idle on the tile. In the video, when the player is already on the tile and turns in the correct direction, the icon appears almost instantly, but when they arrive, the icon waits until the player has actually landed on the tile before displaying. I have no idea if this is easy to configure.
The last little problem I have is that the icon appears immediately when I press the arrow key to move to the tile associated with the event, and not when I arrive at idle on the tile. In the video, when the player is already on the tile and turns in the correct direction, the icon appears almost instantly, but when they arrive, the icon waits until the player has actually landed on the tile before displaying. I have no idea if this is easy to configure.
So you want it to only happen when you've arrived? Then add an isMoving check to the update opacity methods (here I added them in both places, when auto hide is enabled and when auto hide is disabled):
if (Galv.AI.autoHide) { Sprite_ActionIcon.prototype.updateOpacity = function() { if ($gameMap.isEventRunning()) { this.opacity -= 40; } else { this.opacity = ($gameSystem.actionIndicatorVisible && !$gamePlayer.isMoving()) ? Galv.AI.opacity : 0; // EDITED }; };} else { Sprite_ActionIcon.prototype.updateOpacity = function() { this.opacity = ($gameSystem.actionIndicatorVisible && !$gamePlayer.isMoving()) ? Galv.AI.opacity : 0; // EDITED };};I tried your code, it works, but if I land on the square, the animation doesn't play. However, if I'm on the square and I turn in the right direction, then the animation plays. Is there a way to fix this? To make the animation always trigger when the icon appears?
If I want to be picky, I'd like to have, like in this video (), an opacity that increases over 3-4 frames, but the basic Galv animation is enough for me if it's constant (unlike in my test).
I don't understand what you mean? In your second video the icon only appears when you're facing the correct direction? And the same happens in your first video (the icon appeared when you walked on the square in the right direction). Don't know what the problem is?
EDIT: Ah do you mean like a gradual opacity change?
EDIT: Ah do you mean like a gradual opacity change?
I'll make a clearer video to explain, no worries.
Hmmm yeah, if the standard Galv plugin "animation" is enough for you, I think you can just add at the end of the update method 2 lines, like in this spot (the if ismoving line and the initpopvars line):
this.updateOpacity(); this._float += this.mod; if (this._float < -0.1) { this.mod = Math.min(this.mod + 0.01,0.2); } else if (this._float >= 0.1) { this.mod = Math.max(this.mod + -0.01,-0.2); }; if ($gamePlayer.isMoving()) this.initPopVars();};Okay, everything works perfectly, you're the goat!
(Maybe in the future I'll change the animation to match the game with the opacity increasing, but at least the core of the plugin works.)
Thank you so much!
(Maybe in the future I'll change the animation to match the game with the opacity increasing, but at least the core of the plugin works.)
Thank you so much!
Ok cool.
You can report the thread as solved.
You can report the thread as solved.
Original thread: https://forums.rpgmakerweb.com/threads/solved-how-to-add-an-icon-above-the-player-with-galv-action-indicator.182320/