i'm open to using scripting and also i think that may be the only way since i tried with regular events and it didn't work
VXAce how can i make health go down every frame when anyone has a state?
RPG Maker VXAce SupportCan you elaborate what you mean by frame? Also, during battle? On the map?
like okay let's say you have a poison status effect, except instead of it taking away a large amount of health per turn, it takes away a little amount of health every frame. here's a graph
i did not see the reply buttoni will now press that Hi Hello Please Look One Post Up
I tried this and it works on the default base battle system. I don't know if you have any other scripts, but I can't guarantee it'll work on them. (Edit: Tested on Yanfly Battle System / Moghunters. It SHOULD be fine.)
It only makes the afflicted person lose the HP. (I wasn't sure if you wanted it to affect the whole party or not.)
Ruby:
#==============================================================================
# Bad Poison - Frame-based Poison
# Deals 1 damage per cursor input during battle menus.
#==============================================================================
module BadPoison
# Change the number below to be the state ID of the poison you want.
POISON_ID = 2
end
#==============================================================================
# Window_Selectable
#==============================================================================
class Window_Selectable
def apply_cursor_poison
actor = $game_party.members.find { |m| m.inputable? }
return unless actor && actor.state?(BadPoison::POISON_ID)
was_alive = actor.hp > 0
actor.hp = [actor.hp - 1, 0].max
actor.refresh
SceneManager.scene.instance_variable_get(:@status_window).refresh rescue nil
actor.perform_damage_effect if SceneManager.scene.is_a?(Scene_Battle)
if was_alive && actor.hp <= 0
actor.add_state(actor.death_state_id)
actor.perform_collapse_effect
end
end
[:cursor_down, :cursor_up, :cursor_right, :cursor_left].each do |dir|
alias_method :"bad_poison_#{dir}", dir
define_method(dir) do |wrap = false|
send(:"bad_poison_#{dir}", wrap)
apply_cursor_poison
end
end
alias bad_poison_process_ok process_ok
def process_ok
apply_cursor_poison
bad_poison_process_ok
end
end
thank you it does work (sorry i didn't get to you earlier i forgot)
Original thread: https://forums.rpgmakerweb.com/threads/how-can-i-make-health-go-down-every-frame-when-anyone-has-a-state.182962/