How do I save the player's location as in an RPG.

0 favourites
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • Hello !

    I am French and I write this request with the help of Google translation.

    I would like to know how can we save the player's location when he changes layout? I had a small system with variables to do that, but it only worked between two layouts ...

    I would also like to save his animation, style ... If he looks at the top, I would like that when he changes layout, he still looks at the top.

    Would you have a solution to offer me?

    I look forward to your answers, thank you in advance.

  • I was able to solve my problem regarding the direction of the player, it was stupid.

    By cons, I still have the problem of the location of the player.

  • Up

  • Try using the Global property set to Yes.

    Global

    By default, all instances are destroyed when the layout ends (e.g. when going to the next layout). If Global is Yes, none of the instances of this object type will be destroyed when switching layouts.

    Use on start of layout to adjust position if needed.

  • Try using the Global property set to Yes.

    Global

    By default, all instances are destroyed when the layout ends (e.g. when going to the next layout). If Global is Yes, none of the instances of this object type will be destroyed when switching layouts.

    Use on start of layout to adjust position if needed.

    Where can I find this?

    Is this a behavior? An action?

  • It's good, I could find what you were talking about.

    I'll try that tomorrow, thanks for your answer

  • Try using the Global property set to Yes.

    Global

    By default, all instances are destroyed when the layout ends (e.g. when going to the next layout). If Global is Yes, none of the instances of this object type will be destroyed when switching layouts.

    Use on start of layout to adjust position if needed.

    How to say...

    When I launch the layout, everything is fine. I'm going to the next map ...

    The, the camera goes I do not know where, I do not see the character ... I go down to access the previous map, and there, there is no more character. I can move the camera that looks downright elsewhere, but I do not see the character.

    In the preview :

    In construct 2 :

  • I created sprites "Action" which in contact with the player, makes it go on another layout without destroying the object ...

    Is this the mistake?

  • If it's the fault, how can I fix it?

    I'm a little tired, I have no solution right now ...

  • Yeah...

    I put an Trigger once and I feel like playing on both maps at the same time ... It's ... very weird ...

  • Sorry having a little trouble understanding because of translation I think.

    Do you have the "Scroll To" behavior on the player?

    When you change layout, you'll have to position the player where you want with an On Start Of Layout event.

  • Sorry having a little trouble understanding because of translation I think.

    Do you have the "Scroll To" behavior on the player?

    When you change layout, you'll have to position the player where you want with an On Start Of Layout event.

    Yes the player has the behavior "scroll to".

    But if I position the player with an "On start of layout", his position will not be recorded, I'm wrong?

  • Do you mean you want him to be back at the same spot when you return to the layout a second time? Then you want to add the "persist" behavior.

  • Do you mean you want him to be back at the same spot when you return to the layout a second time? Then you want to add the "persist" behavior.

    Thank you, I think it works.

    Yes ... "I think" because as the character now activates both events at the same time, I see a beautiful bug that swaps the two layouts without stopping. Would you have a trick to prevent this? I have the annoying tendency to complicate things while they can be easily solved.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Can't help without seeing your project event sheet.

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