Hi, for the game I am developing, since it will be mainly played with the mouse, I had thought of changing the indicator when you click the mouse at a point on the map. Instead of the white square, I wanted to put something custom and search on the internet I found this plugin:
the plugin works, but as soon as I change map the indicator disappears, any point I click no longer appears. I tried to fix it but couldn't, so if anyone can give me a hand I would be grateful.
Code:
Sprite_Destination.prototype.createBitmap = function() {
this.bitmap = ImageManager.loadSystem('Cursor');
this.setFrame(0, 0, 48, 48);
this.anchor.x = 0.5;
this.anchor.y = 0.5;
};
Sprite_Destination.prototype.updateAnimation = function() {
this._frameCount++;
this._frameCount %= 20;
if (this._frameCount > 10) {
this.setFrame(48, 0, 48, 48);
} else {
this.setFrame(0, 0, 48, 48);
}
this.opacity = 255;
this.scale.x = 1;
this.scale.y = this.scale.x;
};
the plugin works, but as soon as I change map the indicator disappears, any point I click no longer appears. I tried to fix it but couldn't, so if anyone can give me a hand I would be grateful.