Remembering positions/conditions after save menu visit

  • #1, by andiliddellMonday, 24. October 2016, 15:26 8 years ago
    Hi everyone,

    It's been a while but I'm finallly back bug testing my game and unfortunately remembering why its been over 9 months since I last touched it.... ARRRGGHH the frustration

    The bug testing procedure is so time consuming with VS and there's a couple of really frustrating "features" that are creating so much more work for me.

    When a player clicks on "save" to go to my save menu, even if they decide not to save and immeidtaely click "resume" the scene they were on restarts, as if they have just arrived at the scene, so the player position and any other complex if statements that ran at the start of the scene get ran again.

    It's forcing me to write further wordy if statements to check a "justCameFromMenu" condition on EVERY room in my game to work around the fact a menu load in VS is actually a totally new scene, rather than just being an overlay that pops up infront of the active scene. This would be a much better solution, meaning you dont leave the active scene and nothing needs to be reset or re checked and positioned every time.

    Other than a basic autosave/resume game method, (which im trying to avoid) does anyone have a solid workaround for this?

    Yours hopefully
    Andi

    Forum Fan

    178 Posts


  • #2, by marvelSaturday, 29. October 2016, 23:40 8 years ago
    Hi Andi,
    sorry, I don't know how this happens. I don't have any problem at all with savegames. Can you please post screenshots of your actions? I guess there might be anything wrong there. 

    Best,
    Thomas

    Key Killer

    598 Posts

  • #3, by andiliddellTuesday, 13. December 2016, 13:03 8 years ago
    Hi Marvel & the 110 forum users who have read this, smile

    Sorry for the late reply.

    Other forum users haven't ever seemed to have an issue with this and when I play other demos made in VS I can't understand how they've not had the problem too. 

    Unless I'm doing something very different to other people or mis-understanding?

    Here's a simple scenario to explain:
    • Im playing my game and walk into room number 2, a bit of dialogue automatically happens and an animation plays as the room has a "at beginning of scene action" which tells these things to happen.
    • After the dialogue and animation I walk into the middle of the room and I decide I want to save my game, so I click the little save icon which opens the save game menu screen I've created.
    • Its a MENU scene, and I followed the original savegame menu tutorial from the forums to build it.
    • I click an empty slot and click save, the game saves fine and generates a screenshot of my character in the middle of the room where I left him.
    • I click resume to go back to where I left my character using "change to scene of current character" action.
    • NOW THE PROBLEM HAPPENS
    • VS reloads the scene of current character and then re-triggers the "at beginning of scene action".. causing the player to be back at the edge of the screen by the door, the dialogue to play again, and the animation to play again as if the scene has reset.

    My 3 questions are:

    1. Does no-one else use "at beginning of scene" actions? or is everyone writing an "if statement" to check that enter scene actions have already been run, or a check to see if the player just came from the save screen?
    2. Is there an action I'm missing to remember where everything is before I change to the save menu?
    3. Why has no-one else ever mentioned this problem on the forum?


    Ive got lots of scenes, actions and interelated conditions and don't know the best route forward, other than having a single save button which doesnt ever leave the current scene and just executes an autosave. I don't like limiting the players choice like this though.

    This sounds much more complex than it needs to be roll

    Hoping someone can help

    Kind Regards
    Andi

    Forum Fan

    178 Posts

  • #4, by afrlmeTuesday, 13. December 2016, 14:48 8 years ago
    Yes, you need to wrap at begin of scene actions inside of if queries. At begin of scene always gets triggered whenever you reload / display a scene. You could use conditions or value based queries.

    Personally I don't always use the at begin of scene action for cut-scenes as I often use them for setting up various things in a scene such as opacity, rotation, scale of scene objects/animations, etc or for adding some shader effect maybe or for calling an action block that contains a loop that is dynamically handling something in the scene, such as movement of clouds or lighting & so on & so on.

    You need to figure out which things need to be triggered each time & which you only want to trigger a single time. You should also kill any looping action blocks inside of an at end of scene action block with the quit action action part.

    By the way, there is an action part under scene that let's you store the current scene into memory with an option to declare objects, characters, both & also how many scene changes it should remain in the cache.

    Imperator

    7278 Posts

  • #5, by andiliddellTuesday, 13. December 2016, 16:04 8 years ago
    And does this keep scene in memory mean that the "at begin scene" doesnt get triggered?

    To be honest Ive started resorting to a completely automated autosave system, with no user input at all, which I didnt want to do but now see as the only way to get this damn game finished smile

    Now im even finding that running a simple Execute autosave#2 at the beginning of each scene isnt working half the time either. I'm seeing the save icon flash (which i setup) so the script is being run and works on some scenes.. on others it just doesnt update the autosave.

    any ideas?

    Cheers
    Andi

    Forum Fan

    178 Posts

  • #6, by afrlmeTuesday, 13. December 2016, 16:13 8 years ago
    Autosave requires the scene to be loaded. Add a pause of say 500ms before executing the autosave. Should do the trick. wink

    & I'm not sure about keep scene in memory preventing the at begin of scene action from triggering. I doubt it though. I've not personally used that action part as of yet.

    Imperator

    7278 Posts

  • #7, by andiliddellTuesday, 13. December 2016, 16:24 8 years ago
    Cool thanks lee,

    I've had to bump it up to 1 second it seems as 500ms wasnt working, but it has fixed it.

    Is this documented anywhere? You've probably told me this before, but it's really frustrating that little niggles like this can completely render a game unplayable, or certinaly un-releasable to the public.

    Do you know if there's an overhaul of the save system planned in the next version?

    cheers

    Forum Fan

    178 Posts

  • #8, by afrlmeTuesday, 13. December 2016, 16:44 8 years ago
    It's been mentioned a few times. I think the pause value depends on scene fade in time.

    & no, not to my knowledge. Sorry.

    Imperator

    7278 Posts

  • #9, by anna-arnoldWednesday, 14. December 2016, 09:36 8 years ago
    We solved this by using an autosave before changing to the main menu /save menu. We load this autosave every time when we resume the game.

    "Keep Scene in Menu" is something that I'm curious what it is for. 
    And "At the beginning of the Scene" has an "if...end if" in it with a boolean condition. In our game at least ;D We couldn't solve it else.
    I try not to use "at the beginning of the scene" too often.

    Newbie

    95 Posts