Character losing animation on layout change

0 favourites
  • 9 posts
From the Asset Store
Simplistic hyper-casual game with nature elements. Tap to switch between the 4 elements and reach a better score.
  • Help! I’m a complete noob to this and I cannot figure out why when I change layouts my character loses all his animations.

    Essentially what I want to do is require the player to find a KEY in every layout before the door will “open” and he will be taken to the next layout (I plan on repeating this for every level. But I feel like I’ve got it all in correctly and it’s just not working!!

    The character can obtain the key, it will show up in my HUD, and the door will work, but when I arrive at layout2 all my animations are gone and I’m just a single frame version of my character

    Tagged:

  • I’m so stuck! I’ve tried reading/watching every tutorial I can find and nothing works! PLEASE HELP!!

  • Welcome to Construct. Please read this pinned forum post for the best ways to get help in this forum:

    construct.net/en/forum/construct-3/how-do-i-8/best-help-tips-forum-139528

    As stated in the post, the easiest way to get help with issues is for you to give use access to your project.

    Somthing that may help (no guarantee without seeing the actual project) each layout has a separate instance of the player (and other characters). When you leave one layout and enter another, every change made to the player will be reset to the level default. To persist information between layouts, the information needs to marked as global.

    On a side note:

    I plan on repeating this for every level

    Duplicating code over multiple event sheets is not a good idea. If you find there is a bug, or want to add a new feature, you have to remember to make the change on all event sheets containing the duplicated code. Instead, layouts can all use the same event sheet. Also, if you do have events that are specific to certain layouts, you can include an entire event sheet into another. So, put all your common events into one event sheet and include it in all the other event sheets that need it.

  • Ok I will read through it and try to post my project, I couldn’t figure out how to do that or I would’ve done that in the original post, so thanks for posting that!

    But just so I’m clear are you thinking that if my character is marked as “global” then it should carry all animations to the next layout? (I’m asking because I’m almost certain I tried that, and at this point I feel like there must be a glaring problem with my project that I’m just not seeing)

    And as far as event sheets, right now I’m still working off a single event sheet bc the YouTube tutorial I watched for the basics did so. I had another project, that I abandoned and started over because the tutorial I watched for that one had multiple event sheets and I just got into a spiders web of information that I couldn’t make and sense of. But again, I’ve never tried anything like this before and I’m certain I screwed something up!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's probably that the movement logic for the player isn't linked to the layout? The layout should be using the event sheet with the logic on, it might not be using any event sheet if you know where that option is.

  • OK that worked! Layout 2 didnt have an event sheet assigned! thanks so much!! i am goin to try to attach my project to this post, but Im not sure im even doin that right! it would be cool to get some overll feedback before i go any further because im certain ive already made some othe similar mistakes!

  • Ive go the file saved in Google drive bu cannot figure out how to attach it to this post

  • You just need to copy the link and put it in a post.

  • I don't see a need to post it, you have events on one event sheet split into groups. You just need to remember to assign the event sheet to each layout you add.

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