Well.. depending on what battle system you're using, all you would have to do is go into your data base and move over to troops. In the battle event area at the bottom, put in a conditional branch, and make the condition "QuestStart" or whatever you switch is on. Now put control variable +1 for your kill count. And in the quest giver's event, put another conditional branch and make the condition; If "KillCount" is greater than or equal to how many you have to kill..
Or you could just script it like so ;
Class Game_Party < Game_Unit
alias ekc_initialize initialize
def initialize
ekc_initialize
@enemy_kill_count = 0
end
def increase_kill_count
@enemy_kill_count += 1
end
def kill_count
return @enemy_kill_count
end
end
class Game_Enemy < Game_Battler
alias ekc_perform_collapse perform_collapse
def perform_collapse
ekc_perform_collapse
$game_party.increase_kill_count
end
end
$game_party.kill_count return the value of kills..
I don't take any credit for this, I found the script at Rpgmakervx.net..
I also found how to do this at Rpgmakervx.net, so props to them. x3
There's a faster way to do that.
class Game_Party < Game_Unit
attr_accessor :enemy_kill_count
alias ekc_initialize initialize
def initialize(*a)
ekc_initialize(*a)
@enemy_kill_count = 0
end
end
class Game_Enemy < Game_Battler
alias ekc_perform_collapse perform_collapse
def perform_collapse(*a)
ekc_perform_collapse(*a)
$game_party.enemy_kill_count += 1
end
end
Instead of $game_party.kill_count, now use $game_party.enemy_kill_count
Sorry for stealing this AbsoluteIce, I just saw an opportunity to make a code more efficient. Also, the first line of your code would cause a syntax error, because 'class' and all other keywords are case sensitive.