[solved]Sprite Animation Based on Layout

0 favourites
  • 3 posts
From the Asset Store
3 pixel charaters with over 8 animations each + animations with a gun
  • Okay, one of the things I'm trying to find to see if there is a simple way of doing this. Currently have had no luck finding a simple way other than making a new Event Sheet for each Stage Layout.

    What I'm trying to do is this:

    During Stage One the main character's outfit is set to A.

    During Stage Two the main character's outfit is set to B.

    Now I could always just make it where I have 2 different Event Sheets for this. But I'm trying to use Includes for things instead and have one separate event for all things that pertain to character movement and it's animation list is in there.

    Attached is a SS of what I'm kinda trying to do minus the one thing I can't seem to find to add that would be a simple way to do it if there's a way.

    So essentially for each stage then I'd have it's own Movement section in Character that has it's own Animation set for an outfit, and the game would then run a check to see which Stage it's on and then pick the Animation set of the Character and use that one for that particular stage.

    If anyone knows how to do this a simple way without just having it's own separated event sheet for each Stage's Layout would be helpful.

    Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Actually I have thought of something. Going to test it. Will reply/edit this with an update if it works. Had an epiphany I'm going to see if it works the way I think I can manipulate it to do so.

    ----------------------------------------

    Edit: Okay, so yeah my epiphany was close enough to being right. Just some more tweaks to work on to get it working out perfectly. At the moment when switching between stages it will change the Outfit once begin moving, but on one of the stages when you die it reverts to another stages outfit. Just need to work out that part.

    What I did for it was Create a Family called Characters then attached an instance variable to the family called Stage. Then modified the stage names to just an int value of 1, 2,, 3, etc. Then upon Layout load it sets that instance variable to int(LayoutName).

    You could do this by just having that instance variable on the sprite itself, but since I'm going to have multiple characters a player can choose from when playing the game figured doing it as a family would work best.

  • Okay solved the issue I had on dying by changing it from on start of layout set the instance variable. to Every Tick. I'd still be open for if anyone has another suggestion or they had a method that works better than what I described to set it up my fix.

    Thanks.

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