"Trigger Once" state not saved in savegame?

0 favourites
  • 4 posts
From the Asset Store
State Machine
$10.99 USD
State Machine is a great tool for managing the state of anything in your game.
  • I'm using system->save and system->load for savegames . I'm having a weird issue…

    My game has 2 layouts -- the title layout and the level layout. The game is saved in the level layout (e.g., when the player reaches a checkpoint). The title layout has a "continue" item that, when clicked, calls system->load to load the savegame. In my level layout event sheet I have an event that uses the "system-> trigger once" condition.

    Steps to reproduce the issue using this project:

    - Preview project

    - Press 2 to go to the level layout

    - Press S to save the game

    - Press 1 to go to the title layout

    - Press L to load the game

    What should happen:

    What actually happens:

    For some reason the "trigger once" gets reset, i.e. it's as if it hasn't triggered, and the text->append action runs again. But this only happens if system->load is called from the title layout -- if you press L from the level layout, the text->append action does NOT run again (which is the expected behavior).

    I hope this makes sense. Even more, I hope someone can explain why this is happening.

    Thanks

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I really don't like "Trigger once" condition and rarely use it. It seems innocent and convenient, but in reality it often causes nothing but troubles.

    I suggest using a boolean variable instead.

  • Seems to be as designed that if you load a game that involves transitioning to another layout, it runs through events after the game load. Some are skipped though like 'on start of layout' events. I wouldn't expect anything different because loading the game in a sense is going to or loading the layout unless you are already in it.

  • Seems to be as designed that if you load a game that involves transitioning to another layout, it runs through events after the game load. Some are skipped though like 'on start of layout' events. I wouldn't expect anything different because loading the game in a sense is going to or loading the layout unless you are already in it.

    Thanks guys. I guess I have a different understanding, I thought system->load essentially reloads the exact state of the game when it was saved. I would expect the status of 'trigger once' to be preserved.

    Ashley Can you clarify if this is an issue or proper behavior? If the latter, are there any other things that are not preserved on a system->load?

    Thanks

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)