Hello I am currently writing on a plugin that needs to change a certain condition when a new battler appears in the battle.
I am also writing a second plugin, that changes an enemies hue dependend on conditions.
But if the first plugin changes the condition which affects the hue of the battler in the second plugin it won't be displayed when it appears:
It will only be displayed, when I attack it once:
How can I make it being displayed immediately?
I've written the following test code to reproduce this issue:
Edit:
Now I found out, that this can be reproduced simply by eventing.
Just add a Enemy Transform command followed by a Enemy Appear command for the same enemy. The order of those commands even doesn't matter.
I debugged Sprite_Enemy.prototype.updateBitmap and here everything seems to be fine. The bitmap seems to be already loaded and the visibility is set to true.
But it still wont display until it is attack or it attack itself.
I am also writing a second plugin, that changes an enemies hue dependend on conditions.
But if the first plugin changes the condition which affects the hue of the battler in the second plugin it won't be displayed when it appears:
It will only be displayed, when I attack it once:
How can I make it being displayed immediately?
I've written the following test code to reproduce this issue:
Code:
//=============================================================================
// Burning Orca Plugins
// Test.js
// Version: 1.0
//=============================================================================
var Imported = Imported || {};
Imported.Test = true;
var BurningOrca = BurningOrca || {};
var BO = BurningOrca;
BO.Test = BO.Test || {};
//=============================================================================
/*:
* @plugindesc Test
* * @author Burning Orca
*/
BO.Test.Game_Enemy_appear = Game_Enemy.prototype.appear;
Game_Enemy.prototype.appear = function()
{
BO.Test.Game_Enemy_appear.call(this);
$gameVariables.setValue(1, 1);
}
BO.Test.Game_Enemy_battlerHue = Game_Enemy.prototype.battlerHue;
Game_Enemy.prototype.battlerHue = function()
{
if( $gameVariables.value(1) === 1 )
{
return 187;
}
return BO.Test.Game_Enemy_battlerHue.call(this);
};
Edit:
Now I found out, that this can be reproduced simply by eventing.
Just add a Enemy Transform command followed by a Enemy Appear command for the same enemy. The order of those commands even doesn't matter.
I debugged Sprite_Enemy.prototype.updateBitmap and here everything seems to be fine. The bitmap seems to be already loaded and the visibility is set to true.
But it still wont display until it is attack or it attack itself.