hi
@caethyril
To tell you my problem in detail, i am using MogHunter's Treasure Popup in Battle plugin:
https://atelierrgss.wordpress.com/rmv-treasure-popup-battle/
I really want to make enemy drop items when a certain condition has met instead of that they got killed.
After looking into the plugin codes, i guess this is the code to make Items Pop up:
SpriteEnemyTrP.prototype.initialize = function(sprite) {
Sprite.prototype.initialize.call(this);
this._sprite = sprite;
this._mode = Moghunter.trPopup_animation;
this.visible = false;
this._enemy = this._sprite._enemy;
this.createIcon();
if ($gameTemp._trBatRealTimeDrop) {
$gameTemp._trBatDropLock = true;
this.gainDropItems();
};
};
I am trying to find a way to invoke this function in battle via script to see if it is the code to "Pop Up Item" or not
SpriteEnemyTrP.prototype.initialize(argument)
but i am not sure how to do it properly, look like it will need sprite as its argument.
And this sprite is Sprite_Enemy object i showed in the picture at my previous post.
That why i want to access Sprite_Enemy property of a specified Enemy

But it doesn't work, those codes doesn't make Item Pop Up
