I am working on an autosave script for my game. I have it set up at the moment to save every time you take a step, but this is extremely laggy.
Instead, I want to make it save if $game_party.steps is divisible by 10 (so every 10 steps it saves).
Here's that part of the script:
I wondered if anybody here could help me?
Instead, I want to make it save if $game_party.steps is divisible by 10 (so every 10 steps it saves).
Here's that part of the script:
Code:
def initialize_autosave
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
if (@hp != actor.hp ||
@hpm != actor.maxhp || @mp != actor.sp || @mpm != actor.maxsp ||
[COLOR=Red]@steps != $game_party.steps.to_s[/COLOR])
autosave
@hp = actor.hp
@hpm = actor.maxhp
@mp = actor.sp
@mpm = actor.maxsp
[COLOR=Red]@steps = $game_party.steps.to_s[/COLOR]
end
end
end
I wondered if anybody here could help me?