I have this script and it works well for me, but I have hit a snag
I want to either call a common event when the state is inflicted, but it doesn't seem to work in battle normally (without a script)
So I was wondering if there was a way to have it implement it via scripting
Otherwise I need to have the state inflicted, and then depending on the character's name give them a certain skill for the time the state effects them.
Also I need it so that the script (all of it) will only effect the party characters.
Currently it is also effecting the monsters.
Here is the script:
[/spoiler]
class Game_Battler
States_Activated_When_Health_Below_Percent = {30 => [17]}
alias_method :seph_statesactivatedbyhealth_gmbtlr_states, :states
def states
n = seph_statesactivatedbyhealth_gmbtlr_states.dup
percent = Integer(self.hp / self.maxhp.to_f * 100)
States_Activated_When_Health_Below_Percent.each do |p, state_ids|
next unless percent <= p
state_ids.each {|s| n << s unless n.include?(s)}
end
return n.dup.sort
end
end
[/spoiler]
(ps Sorry I'm not totally sure on how to implement spoilers)
Thanks for the help.
I want to either call a common event when the state is inflicted, but it doesn't seem to work in battle normally (without a script)
So I was wondering if there was a way to have it implement it via scripting
Otherwise I need to have the state inflicted, and then depending on the character's name give them a certain skill for the time the state effects them.
Also I need it so that the script (all of it) will only effect the party characters.
Currently it is also effecting the monsters.
Here is the script:
[/spoiler]
class Game_Battler
States_Activated_When_Health_Below_Percent = {30 => [17]}
alias_method :seph_statesactivatedbyhealth_gmbtlr_states, :states
def states
n = seph_statesactivatedbyhealth_gmbtlr_states.dup
percent = Integer(self.hp / self.maxhp.to_f * 100)
States_Activated_When_Health_Below_Percent.each do |p, state_ids|
next unless percent <= p
state_ids.each {|s| n << s unless n.include?(s)}
end
return n.dup.sort
end
end
[/spoiler]
(ps Sorry I'm not totally sure on how to implement spoilers)
Thanks for the help.