Zheg

Veteran
Veteran
Joined
Apr 2, 2014
Messages
42
Reaction score
60
First Language
english
Primarily Uses
Hi everyone
i been looking for a script wherever you kill an enemy
like the bat, you get +1 to the assigned variable

i used the Kill Counter plugin of Shaz buts its not working properly
i randomly got from 1 to 2 of each kill and i dont know why its happening.
here some screenies....
tw3TNfs.jpg
Rlv34q1.jpg
zG9PkN4.jpg
92fayBj.jpg

thanks
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,894
Reaction score
14,994
First Language
English
Primarily Uses
RMMV
What battle plugins are you using? If you have mine before them, try putting it after; if you have mine after them, try putting it before. See if it makes any difference.

If it doesn't, provide a link to both plugin threads and someone might be able to give you a compatibility patch.

Your imps don't get revived at all during the battle, and killed twice, do they?
 

Zheg

Veteran
Veteran
Joined
Apr 2, 2014
Messages
42
Reaction score
60
First Language
english
Primarily Uses
What battle plugins are you using? If you have mine before them, try putting it after; if you have mine after them, try putting it before. See if it makes any difference.

If it doesn't, provide a link to both plugin threads and someone might be able to give you a compatibility patch.

Your imps don't get revived at all during the battle, and killed twice, do they?
im using yanfly battle engine, they dont get revived,
also i tried to turn off the battle plugins with its expansions and changed the plugins order, still gives me random values
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,894
Reaction score
14,994
First Language
English
Primarily Uses
RMMV
Is the variable used by any other plugins or other events that you've just forgotten about?
 

Zheg

Veteran
Veteran
Joined
Apr 2, 2014
Messages
42
Reaction score
60
First Language
english
Primarily Uses
Is the variable used by any other plugins or other events that you've just forgotten about?
no it doesnt, but i just made an another solution, at troops events when enemies reach 0, gives me that variable, but the problem its i need to do it in every troop event so, will take me alot of time lol
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,894
Reaction score
14,994
First Language
English
Primarily Uses
RMMV
So if you disable ALL other plugins, the problem still happens? Could you show a screenshot of the event where you run the start/end counter commands?
 

Ahuramazda

Veteran
Veteran
Joined
Nov 9, 2012
Messages
262
Reaction score
130
First Language
English
Primarily Uses
RMMZ
I know exactly what is happening here, I was having the same problem when I was making my own kill tracking plugin. When you are using Yanfly's Battle Engine, he calls the collapse event many different times through his script (the reasoning behind it I do not fully understand), but if you go and remove all but the collapse effect in the remove Immortal section, it will work.

I have made these edits myself and tested in my game for a very long time and I have yet to see any downside or bugs arise from removing all the extra calls. I will list the ones that I have edited out because of the multiple collapse calling. Just copy/paste or simply comment out each of the perform collapse lines in each section of your plugin.

Code:
Yanfly.BEC.BattleManager_invokeMagicReflection =
    BattleManager.invokeMagicReflection;
BattleManager.invokeMagicReflection = function(subject, target) {
    Yanfly.BEC.BattleManager_invokeMagicReflection.call(this, subject, target);
    // if (subject.isDead()) subject.performCollapse(); // Edit: cause of duplicate collapse calls

Code:
BattleManager.actionActionEffect = function(actionArgs) {
    if (actionArgs && actionArgs[0]) {
      var targets = this.makeActionTargets(actionArgs[0]);
    } else {
      var targets = this._targets;
    }
    targets.forEach(function(target) {
      if (target !== undefined) {
        var alreadyDead = target.isDead();
        this.invokeAction(this._subject, target);
        if (target.isDead() && !alreadyDead) {
            //target.performCollapse(); // Edit: cause of duplicate collapse calls
        }
      }
    }, this);
    return true;
};

Code:
Yanfly.BEC.Game_Battler_regenerateAll = Game_Battler.prototype.regenerateAll;
Game_Battler.prototype.regenerateAll = function() {
    this.clearResult();
    var lifeState = this.isAlive();
    Yanfly.BEC.Game_Battler_regenerateAll.call(this);
    if (!BattleManager.timeBasedStates()) this.updateStateTurns();
    if (!BattleManager.timeBasedBuffs()) {
      this.updateBuffTurns();
      this.removeBuffsAuto();
    }
    if (this.isDead() && lifeState === true) {
      //this.performCollapse(); // Edit: cause of duplicate collapse calls
    }
    if ($gameParty.inBattle()) this.startDamagePopup();
};

Code:
BattleManager.invokeCounterAttack = function(subject, target) {
    var realTarget = this.applySubstitute(target); // EDIT
    this._action.apply(realTarget); // EDIT
    if (target.hp == 0) { // EDIT
    } // EDIT
    else { // EDIT
        var action = new Game_Action(target);
        this._logWindow.displayCounter(target);
        action.setAttack();
        action.apply(subject);
        this._logWindow.displayActionResults(subject, subject);
        // if (subject.isDead()) subject.performCollapse(); // Edit: cause of duplicate collapse calls
    }
};
WARNING: The above counter attack snippet has been edited to prevent a "dead enemy" from counter attacking. It is only used to show what section needed to be commented out from the bottom line. If you do not want this feature, just find that section in your plugin and edit out the line manually instead of copy/pasting the whole section.
 

Zheg

Veteran
Veteran
Joined
Apr 2, 2014
Messages
42
Reaction score
60
First Language
english
Primarily Uses
woah thank you very much
i appreciate it alot
you are the very best of the world :kaoluv:
 

Latest Threads

Latest Posts

Latest Profile Posts

Ami
need a time to not open my MV,still addicted with new vegas

i wonder what addiction effect behind playing new vegas too much,maybe INT & Science gone worse in many days :D
cdjensen94 wrote on Kaliya's profile.
Are you the one who develops Kaliya's Visual Map Enhancements. If so I desperately need some help. I bought the plugin back a few months. I've only started using it recently.
Cause MP Damage instead of HP, Localization Plugin for Translation | RPG Maker News #112

Here in Fla were are seeing crazy covid spikes and some vaccinated getting bad infections. I had a mild fever on Thurs but it went down fast. How is everyone else doing. Hopefully you are all well. :)
Wish I was better at art, specifically that I was faster at it, bc this one NPC took Several Days to complete! It's gonna take So Extremely Long to do all of the art for my game, never mind writing it... Anyways, here's my gorgon, Hopernica Sthyxis!

57b88732c7abbcd84981dacf624a98495af61fcc.gifv

Forum statistics

Threads
113,831
Messages
1,077,762
Members
147,886
Latest member
NewMike
Top