Hi 🙂
I was editing a script for my project (Zelda Eternal Struggle) and I need your help !
I tried every wait command (wait(frame); frame.time { Graphic.update }) but don't work eigher,
frame.time freeze the game while it plays the Sound Effect.
Hum, I need some help ...
The SE works in game, but they are repeated so many times in 1 seconds, that I need to make a wait commant to delay the se playing frequency
Here's the script (look def update, I turned the lines that makes me mad into comments)
#===============================================================================# ■ LOW_LIFE_ANIMATION#===============================================================================module LOW_LIFE_ANIMATION #Suffix of the spriteset LOW_LIFE = "_LOWANI" #Wait count when he's standing still and seems hurt WCOUNT = 15 #Here, add the sound when Link is suffering SE = RPG::AudioFile.new('Link_Huff1', 100) #-------------------------------------------------------------------------- # ● Character Name #-------------------------------------------------------------------------- def character_name filename = super for i in 0...$game_party.actors.size actor = $game_party.actors if @breakacting and not $game_system.map_interpreter.running? & if actor.hp * 100 / actor.maxhp <= 30 new_name = filename + LOW_LIFE filename = new_name if RPG_FileTest.character_exist?(new_name) endendend return filename end #-------------------------------------------------------------------------- # ● Breakact #-------------------------------------------------------------------------- def breakact=( @breakacting = b @step_anime = b end #-------------------------------------------------------------------------- # ● Update #-------------------------------------------------------------------------- def update super if controllable? if @breakact_count.to_i > 0 @breakact_count -= 1 else self.breakact = true# $game_system.se_play(LOW_LIFE_ANIMATION::SE)# 14.times do# Graphics.update end else @breakact_count = WCOUNT unless self.action != nil or $game_map.starting? or self.knockbacking? self.breakact = false end end endend#===============================================================================# ■ Game_Player < Game_Character#===============================================================================class Game_Player < Game_Character include LOW_LIFE_ANIMATIONend#===============================================================================# ■ Game_Player#===============================================================================class Game_Player < Game_Character #-------------------------------------------------------------------------- # ● Controllable? #-------------------------------------------------------------------------- def controllable? return false if @actor == nil return false if moving? return false if @move_route_forcing or $game_temp.message_window_showing return false if $game_system.map_interpreter.running? return false if self.action != nil return false if self.battler.stop return false if @character_name != @actor.character_name return false if terrain_tag == XAS::FALL_TERRAIN return false if terrain_tag == XAS::SWIMMING_TERRAIN for i in 0...$game_party.actors.size actor = $game_party.actors return false if actor.hp * 100 / actor.maxhp > 30 end return true endend$LOW_LIFE_ANIMATION = trueThat's the first time this happend to me ... And if someone can check and correct what was wrong (cf : XAS ABS is used)
Thx
I was editing a script for my project (Zelda Eternal Struggle) and I need your help !
I tried every wait command (wait(frame); frame.time { Graphic.update }) but don't work eigher,
frame.time freeze the game while it plays the Sound Effect.
Hum, I need some help ...
The SE works in game, but they are repeated so many times in 1 seconds, that I need to make a wait commant to delay the se playing frequency
Here's the script (look def update, I turned the lines that makes me mad into comments)
#===============================================================================# ■ LOW_LIFE_ANIMATION#===============================================================================module LOW_LIFE_ANIMATION #Suffix of the spriteset LOW_LIFE = "_LOWANI" #Wait count when he's standing still and seems hurt WCOUNT = 15 #Here, add the sound when Link is suffering SE = RPG::AudioFile.new('Link_Huff1', 100) #-------------------------------------------------------------------------- # ● Character Name #-------------------------------------------------------------------------- def character_name filename = super for i in 0...$game_party.actors.size actor = $game_party.actors if @breakacting and not $game_system.map_interpreter.running? & if actor.hp * 100 / actor.maxhp <= 30 new_name = filename + LOW_LIFE filename = new_name if RPG_FileTest.character_exist?(new_name) endendend return filename end #-------------------------------------------------------------------------- # ● Breakact #-------------------------------------------------------------------------- def breakact=( @breakacting = b @step_anime = b end #-------------------------------------------------------------------------- # ● Update #-------------------------------------------------------------------------- def update super if controllable? if @breakact_count.to_i > 0 @breakact_count -= 1 else self.breakact = true# $game_system.se_play(LOW_LIFE_ANIMATION::SE)# 14.times do# Graphics.update end else @breakact_count = WCOUNT unless self.action != nil or $game_map.starting? or self.knockbacking? self.breakact = false end end endend#===============================================================================# ■ Game_Player < Game_Character#===============================================================================class Game_Player < Game_Character include LOW_LIFE_ANIMATIONend#===============================================================================# ■ Game_Player#===============================================================================class Game_Player < Game_Character #-------------------------------------------------------------------------- # ● Controllable? #-------------------------------------------------------------------------- def controllable? return false if @actor == nil return false if moving? return false if @move_route_forcing or $game_temp.message_window_showing return false if $game_system.map_interpreter.running? return false if self.action != nil return false if self.battler.stop return false if @character_name != @actor.character_name return false if terrain_tag == XAS::FALL_TERRAIN return false if terrain_tag == XAS::SWIMMING_TERRAIN for i in 0...$game_party.actors.size actor = $game_party.actors return false if actor.hp * 100 / actor.maxhp > 30 end return true endend$LOW_LIFE_ANIMATION = trueThat's the first time this happend to me ... And if someone can check and correct what was wrong (cf : XAS ABS is used)
Thx