Always perform action at dialogue

  • #1, by NovelSunday, 30. March 2014, 19:49 10 years ago
    I have an action that automatically saves the game state to a quick save slot every 2 minutes. This is a pretty neat feature for the player I think, especially since I still have some crashes in my game.
    However, this auto-save also performs during dialogues and loading up such a state causes problems. I thought about turning off the action manually before every dialogue but there must be a more elegant solution. With LUA maybe?

    Newbie

    100 Posts


  • #2, by afrlmeSunday, 30. March 2014, 21:12 10 years ago
    the better approach to an autosave system is to have it save in an at begin of scene action & at end of scene action (for each playable scene), this way it will automatically save every time a playable scene is opened or just before changing to a menu scene.

    much neater than having it on a timer... plus you can always trigger autosave after certain events have been performed in the scene, inventory or wherever.

    -- * --

    by dialog I assume you mean displayed text in general? you could use the registerhookfunction or the textstarted/textstopped event handlers to change condition when displayed text is shown & finished - actually in the same fashion as the music/voice adjustment script.

    Imperator

    7278 Posts

  • #3, by NovelMonday, 31. March 2014, 07:53 10 years ago
    Hm... You are probably right. And since I have already implemented an action that is called at the beginning of every scene, I could just put it in there. :-)

    Newbie

    100 Posts