Separate Running Animation

For questions about using Classic.

Post » Mon Nov 21, 2011 1:17 pm

In my game, I'd like for a longer, more extended version of my character's walking animation for whenever the player decides they want to run. There are two extra sprites to add to the walking animation for it to be a full "Run", so I decided to copy the "walking" sprites and paste them in a new "Running" animation, and added the two running sprites as well.

The way it's working at the moment is that walking is just the arrow keys, while running requires you to hold down a key. I've got the speed increase working fine, but whenever I set it up for the animation to change to "Running", in game, my character freezes on whatever sprite it was on in the animation before holding down the run button. To fix this, I tried setting a frame for my running animation, but the results were the same.

Any ideas on what I can do for a smooth transition into my running animation?
B
16
S
2
G
1
Posts: 156
Reputation: 2,112

Post » Mon Nov 21, 2011 8:25 pm

Post the cap please, it's should be easier then.
B
10
S
6
G
3
Posts: 127
Reputation: 2,481

Post » Mon Nov 21, 2011 8:31 pm

Sounds like your animations are conflicting..I think..kind of confused..You have 2 separate animations for walking and running, right?

What if you make a variable called running, and when it's 0 set the animation to walking, and if it's 1 set the animation to running? You could also store the current walking frame in a variable, then set the running frame to that and resume to have the running animation pick up where the walking one left off.

Or yes, just post a .cap ^^;Tokinsom2011-11-21 20:31:43
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Mon Nov 21, 2011 9:15 pm

D'oh!

Alright, here's the cap:

http://dl.dropbox.com/u/42313097/Boss%20Man%20V11.cap

While I'm at it (And to avoid making too many threads in a row), do you guys have any advice on how to use collision masks? Is there any way I can make on mask for all animations, for instance? I feel like I don't know much about how to use them in Construct.Jim152011-11-21 21:16:04
B
16
S
2
G
1
Posts: 156
Reputation: 2,112

Post » Mon Nov 21, 2011 10:04 pm

http://dl.dropbox.com/u/2721498/2stroke/Construct/cap/platformanim.cap
Is that solved the problem? (If so, look at the animation sheet)

I don't know much about the collission masks, sorry.
B
10
S
6
G
3
Posts: 127
Reputation: 2,481

Post » Mon Nov 21, 2011 10:45 pm

[QUOTE=Pecek] http://dl.dropbox.com/u/2721498/2stroke/Construct/cap/platformanim.cap
Is that solved the problem? (If so, look at the animation sheet)

I don't know much about the collission masks, sorry.[/QUOTE]

Yes, it worked perfectly, thanks!

And I think I see what you did too. You combined "is walking" with "special is down" into one event, correct?

Edit:

I've found out that I can use containers to match up animated sprites with the collision mask... now if only I could figure out how the collision mask works.Jim152011-11-21 23:09:11
B
16
S
2
G
1
Posts: 156
Reputation: 2,112


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests