[solved]Sprite Animation Based on Layout

Get help using Construct 2

Post » Sat Jun 07, 2014 11:36 pm

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
You do not have the required permissions to view the files attached to this post.
Last edited by daehawk on Sun Jun 08, 2014 1:33 am, edited 1 time in total.
B
10
S
2
G
1
Posts: 44
Reputation: 817

Post » Sun Jun 08, 2014 12:00 am

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.
B
10
S
2
G
1
Posts: 44
Reputation: 817

Post » Sun Jun 08, 2014 1:35 am

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.
B
10
S
2
G
1
Posts: 44
Reputation: 817


Return to How do I....?

Who is online

Users browsing this forum: ketramtu18, MaujDeveloper and 10 guests