Hi people~
I have a question , how can I adjust the following code
so that it will store the damage taken of a specified enemy's during a battle? or..else is there any other way?
Originally, this script is written to store the damage taken for an actor id.
This script is written by Gubid
Thanks for any help!
I have a question , how can I adjust the following code
so that it will store the damage taken of a specified enemy's during a battle? or..else is there any other way?
Originally, this script is written to store the damage taken for an actor id.
class Game_Battler
DMG_VAR = 668
alias atk_efct_store_dmg_in_var attack_effect
def attack_effect(*args)
result = atk_efct_store_dmg_in_var(*args)
if self.is_a?(Game_Actor) and self.id == 45 #you can remove the "and self.id == 1" if you want it to store for all actors.
$game_variables[DMG_VAR] = self.damage if self.damage.is_a?(Numeric)
end
return result
end
DMG_VAR = 668
alias atk_efct_store_dmg_in_var attack_effect
def attack_effect(*args)
result = atk_efct_store_dmg_in_var(*args)
if self.is_a?(Game_Actor) and self.id == 45 #you can remove the "and self.id == 1" if you want it to store for all actors.
$game_variables[DMG_VAR] = self.damage if self.damage.is_a?(Numeric)
end
return result
end
This script is written by Gubid
Thanks for any help!