Animation Speed with Wait

Get help using Construct 2

Post » Tue Jul 10, 2012 6:37 pm

Hey guys! So I ran into a problem with the animation speed action.

Basically I have a platformer set up so when you hold down ctrl, you run. I have a progressive build up in speed, so I am animating the run animation to start off slower, and build up speed. How I am doing that is:

ctrl down:
-set animation to "run"
-set wait 0.3
-Set animation speed 10
-set wait 0.2
-Set animation speed 15

ctrl release:
set animation speed 7
set animation "walk"

It works fine expect the animation speed setting does not turn off until the left or right key it let off as well. (so basically the "walk" animation plays but at speed 15 until you stop all movement)

I did a few different test, and know it has to do with the "wait" functions, as when I remove them, this does not happen.

Anyone have an idea on how to maybe this this, or accomplish this effect without the wait function? Thanks!
ginchpuppy2012-07-10 18:52:12
B
3
Posts: 20
Reputation: 315

Post » Tue Jul 10, 2012 7:28 pm

Ctrl down:
-set animation to "run"
-set animation speed to lerp(Sprite.AnimationSpeed,15, dt)

Make sure that the animation speed of the animation is 0 at the beginning.

Example made in r98.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Tue Jul 10, 2012 8:15 pm

Thanks for the info.
I am currently running r90.
How do I update this version exactly, so I can use this function? Thanks again.
B
3
Posts: 20
Reputation: 315

Post » Tue Jul 10, 2012 8:20 pm

Download the last beta version.
http://www.scirra.com/construct2/releases/r95
ImageImageImageImageImageImage
B
93
S
20
G
12
Posts: 1,212
Reputation: 18,482

Post » Tue Jul 10, 2012 9:28 pm

Latest beta is r98.

The r95 is the latest stable build.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Tue Jul 10, 2012 11:08 pm

Hmmm, I installed r98.. and It seems you cant change the animation speed on any animations in the animation properties with this version... with or without the set animation speed to "lerp(Sprite.AnimationSpeed,15, dt)"

Is that what you meant by unstable? =P

Any other way to do this without having to use an unstable version of Construct?
B
3
Posts: 20
Reputation: 315

Post » Tue Jul 10, 2012 11:43 pm

It is the kind of bugs that goes with using beta versions.
The fact that you can't directly edit the animation speed is a bug introduced in r98 and should be fixed in next version.

You can just check the code and write the same in a r95 new project, it will work.
R95 won't be able to open the r98 project, for matters of compatibility.

For now, as a workaround, the animation speed is set in the "Start of layout" event.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Tue Jul 10, 2012 11:56 pm

Yeah, thats what I was thinking... But I saved over the r95 with the r98.... Crap! Anyway to revert this?ginchpuppy2012-07-11 00:15:10
B
3
Posts: 20
Reputation: 315


Return to How do I....?

Who is online

Users browsing this forum: flemmig, MisterAqua, Nifl and 26 guests