04-07-2010, 12:22 AM
@MGC
There was an small issue with touch trigger events and random battle calling.
Since FPLE hadles Game_Player moving? in an different way, it didn't become false after each step, like it do on defautl script.
So the encounter count down and event checks are made only when you stop.
if you keep walking unstoped they would never be checked.
i changed this part of the FLPE_Game_Player update:
to this:
that way the scripts checks also the step count, to verify if an step was done.
I get no errors with that so you could make some tests with this change.
Also, random battle doesn't start if diferectly facing an blocked tile.
Also for people whou would like to use the dungeon background as battle back ground, this small code can do this ;D
Just paste it bellow FPLE scripts.
There was an small issue with touch trigger events and random battle calling.
Since FPLE hadles Game_Player moving? in an different way, it didn't become false after each step, like it do on defautl script.
So the encounter count down and event checks are made only when you stop.
if you keep walking unstoped they would never be checked.
i changed this part of the FLPE_Game_Player update:
Code:
unless moving?
# If player was moving last time
if last_moving || $game_temp.last_moving
$game_temp.last_moving = false
# Event determinant is via touch of same position event
result = check_event_trigger_here([1,2])
# If event which started does not exist
if result == false
# Disregard if debug mode is ON and ctrl key was pressed
unless $DEBUG and Input.press?(Input::CTRL)
# Encounter countdown
if @encounter_count > 0
@encounter_count -= 1
end
end
end
end
to this:
Code:
if not moving? or ($game_system.fple and moving? and @steps != $game_party.steps)
# If player was moving last time
if last_moving
@steps = $game_party.steps
$game_temp.last_moving = false
# Event determinant is via touch of same position event
result = check_event_trigger_here([1,2])
# If event which started does not exist
if result == false or ($game_system.fple and result == false and
passable?(@x, @y, @direction))
# Disregard if debug mode is ON and ctrl key was pressed
unless $DEBUG and Input.press?(Input::CTRL)
# Encounter countdown
if @encounter_count > 0
@encounter_count -= 1
end
end
end
end
I get no errors with that so you could make some tests with this change.
Also, random battle doesn't start if diferectly facing an blocked tile.
Also for people whou would like to use the dungeon background as battle back ground, this small code can do this ;D
Code:
#==============================================================================
# ** Scene_Battle
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
if !@already_aliased
alias main_fple_scene_map main
@already_aliased = true
end
#--------------------------------------------------------------------------
def main
if $game_system.fple
@spriteset_map = FPLE_Spriteset_Map.new
else
@spriteset_map = Spriteset_Map.new
end
main_fple_scene_map
@spriteset_map.dispose
end
end
#==============================================================================
# ** Scene_Map
#==============================================================================
class Scene_Map
#--------------------------------------------------------------------------
if !@already_aliased
alias call_battle_fple_scene_map call_battle
@already_aliased = true
end
#--------------------------------------------------------------------------
def call_battle
if $game_system.fple
@spriteset.update
Graphics.update
end
call_battle_fple_scene_map
end
end