swapping sprite animations

Get help using Construct 2

Post » Thu Oct 10, 2013 8:34 am

here is my animation set up

http://s93.photobucket.com/user/spawn85027/media/animationSetup_zps73c9b71d.jpg.html

B
9
S
2
Posts: 272
Reputation: 1,632

Post » Thu Oct 10, 2013 8:39 am

also what about the different states of animation...so I collect more than 10 acorns..my animation switches..but how can i get it to switch for each state...when i press left..press right...and attack...?
B
9
S
2
Posts: 272
Reputation: 1,632

Post » Thu Oct 10, 2013 8:47 am

http://s93.photobucket.com/user/spawn85027/media/animationSetupsofar_zpsaced40e4.jpg.html

this is what i have so far but it isnt working?
B
9
S
2
Posts: 272
Reputation: 1,632

Post » Thu Oct 10, 2013 8:58 am

Okay, since I see you have 2 sets of animations ready, you will just need to add sub-events to your already existing movement and attack methods to take advantage of their second state. Hopefully this screencap will better explain then. Note what I have shown for the "On right arrow pressed" will need to be replicated for the other movements, attack, and jump.



Here's a small .capx showing the states changing with the above- demonstrated method.

SwapAnimationHelp
B
5
Posts: 11
Reputation: 623

Post » Thu Oct 10, 2013 10:47 am

so I had a player box...and a sprite for my animations...the player box had the behavoirs..platform and scroll to...anyway i never used instance variables before until now..sorry its 243am...my head hurts ha..so i went and rearranged my player....and got idle sprite to move around again...but for some reason when i put that scroll behavoir back on him, i can no longer see the sprite, also the screen moves to a position that my sprite is not at...i can move left and right but not jump...helll not sure what is going on....

i guess i can just upload the project...how do i do that..
B
9
S
2
Posts: 272
Reputation: 1,632

Post » Thu Oct 10, 2013 10:55 am

Sure, let's look at a .capx and see how we can fix what you have. Just save what you have as a Single File from your export options in C2, then upload that to something like, say, dropbox. Once you have that, use the insert hyperlink button on the forums posting options. It'll first ask for a name of the file (type whatever you want), then the url for the dropbox file (just right click and copy the link to the file in dropbox, then paste it into the url request).
B
5
Posts: 11
Reputation: 623

Post » Thu Oct 10, 2013 11:23 am

http://www.dwbailey.com/images/david.capx
B
9
S
2
Posts: 272
Reputation: 1,632

Post » Thu Oct 10, 2013 1:24 pm

The invisible sprite was a result of having another same-named Sprite object causing a conflict. Here is an updated .capx, with changes made and heavily commented, explaining how I achieved the animation swap result. I condensed what you had into a few groups to hopefully make it easier to navigate the event sheet. You didn't need the empty events as spacers, so this should have cleaned up the code quite a bit.

If the comments don't explain how I did it well enough or you have other issues, let me know.

David.capx_v2
B
5
Posts: 11
Reputation: 623

Post » Thu Oct 10, 2013 6:32 pm

pure genius man, seeing that swap made me really happy ha do you remember what was named the same? was that also causing the fireball acorn to being shot from the sky?
B
9
S
2
Posts: 272
Reputation: 1,632

Post » Thu Oct 10, 2013 6:46 pm

you even got his time out sprite working ahaha so funny
B
9
S
2
Posts: 272
Reputation: 1,632

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: tarek2 and 5 guests