[solved] Save issue with walk/run

  • #1, by smac96Saturday, 12. August 2017, 18:07 3 years ago
    I have one bug in the game that I'm not able to solve and I don't know why. Maybe someone can help me smile

    I created this simple action that is called when the player do a "double click" with the mouse in order to let the character run.

    if CHARACTER_IS_NOT_RUNNING is TRUE

       change condition CHARACTER_IS_NOT_RUNNING to FALSE

       change character speed of 'Current character' to 400

       wait until character 'Current character' stops

       change condition CHARACTER_IS_NOT_RUNNING to TRUE

       change character speed of 'Current character' to 100

       quit current action

    else

    end if

    I also activated the action stop character 'Current character' when a scene ends and a menu is called.

    It works without problems in-game.

    The problem is when the player saves the game, quits the game and then reload the savegame.

    The issue is that:
    - if the character was running when the savegame was created, when I load the savegame the character runs only and he doesn't walk anymore.
    - if the character wasn't walking at all when the savegame was created, when I load the savegame the character walks only and he doesn't run anymore.

    What could be the issue?

    Is there any other way to change the speed of the character during a "double click" of the mouse in order to let him run and then change it back to a normal walk speed when the character stops?


    (I use Visionaire 3.7 build 1147)

    Newbie

    97 Posts


  • #2, by sebastianSaturday, 12. August 2017, 23:21 3 years ago
    sadly i dont have a 3.X version to test, but i would assue it would be enough to set the walking speed at the global "left click" action to "normal" as the first action part in it and at the global double click action to "faster" as the first action part... No need to use a condition.

    Thread Captain

    2337 Posts

  • #3, by smac96Sunday, 13. August 2017, 00:40 3 years ago
    Thanks Sebastian.

    I tried your great suggestion but it doesn't work either.

    What is strange is that I have this issue only on certain scenes, and I noticed that it seems to happens only on the scenes where the character changes his outfit.

    Newbie

    97 Posts

  • #4, by esmeraldaSunday, 13. August 2017, 11:29 3 years ago
    I just remered I had a project in 3.7 where I used a change of speed.
    I did it the same way Sebastian sugested. (see image below - editor in german, can't change the language)
    Call action when doubleclick

    Action:
    change speed to 400
    wait until character stops
    change speed to 100

    no conditions needed. I think the problem is, that you only change the condition back to false inside the action. When saving during the action, there is no change back to false possible.

    Great Poster

    389 Posts

  • #5, by smac96Sunday, 13. August 2017, 12:27 3 years ago
    Thanks esmeralda.

    Your suggestion along with the one of Sebastian works great in all the scenes where the main character has his "standard outfit".

    Unfortunately the issue is always there in the scenes where the character changes his outfit to another one (a bigger one). Has maybe something to do with the size of the character on screen?

    Let me explain: my main character has 3 outfits (a small one, a medium one and a big one. same layout, only the size changes. This because If the character on the scene has to be small I use the small version and I don't resize the big one because the results is too blurry and pixeled) and I change it depending on the scene.

    Newbie

    97 Posts

  • #6, by smac96Sunday, 13. August 2017, 16:03 3 years ago
    Uhm... I think I solved it!

    When the scene started I now added this as first action:

    "Change outfit to SMALL"

    and then added this as second action (this was originally on the first position):

    "Change outfit to MEDIUM (or BIG)"

    Very very strange bug. But now it works...

    Newbie

    97 Posts

Write post