Already solved it. Sorry :blink:
I'm working in a little code to count how much time each character killed a enemy.
First, the code:
This is in Game_Actor:
And this is in Scene_Battle:
(this is just the part i added to the code, what is left remains untouched)
Now, the problem: Everytime that i call the "kills" method, it adds 2, instead 1. Why it is happening (i checked it trough that print in the code)
First, the code:
This is in Game_Actor:
Code:
attr_accessor :kills
def setup(actor_id)
@kills = 0
(original script here)
end
def kills
@kills += 1
end
end
Code:
def update_phase4_step6
if @active_battler.is_a?(Game_Actor)
for i in @target_battlers
if i.hp <= i.oldhp
@active_battler.kills
p @active_battler.kills # to test what happened
end
end
end
(original script here)
Now, the problem: Everytime that i call the "kills" method, it adds 2, instead 1. Why it is happening (i checked it trough that print in the code)