#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Initialize loop count
@loop_count = 0
# Loop
loop do
# Add 1 to loop count
@loop_count += 1
# If 100 event commands ran
if @loop_count > 100
# Call Graphics.update for freeze prevention
Graphics.update
@loop_count = 0
end
# If map is different than event startup time
if $game_map.map_id != @map_id
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Initialize loop time
@time = Time.now
# Loop
loop do
# If more than three seconds has passed
if Time.now - @time > 3
# Call Graphics.update for freeze prevention
Graphics.update
@time = Time.now
end
# If map is different than event startup time
if $game_map.map_id != @map_id