Animation framerate dependant on speed

Have any questions or problems in making your game, subscribing and/or using our software? Post here.
Forum rules
Make sure you are using the newest version. This can be downloaded at the top of the site via the "downloads" link.

Use a very good subject. "Problem" or "Help" are unacceptable titles.

Use the search feature before posting a question, as the answer is probably already here.

Subscript out of range error 9: This is a generic error, and we'll need way more information than that to figure out the problem. If you get this, strongly consider following the instructions of submitting your project through the Submit Bug feature within the editor.
User avatar
Kraven4382
Member
 
Joined: Fri Jul 17, 2015 9:56 pm

Animation framerate dependant on speed

Postby Kraven4382 » Tue Apr 11, 2017 1:18 am

Hello,
I am working on feature that allows the character to "run" when shift is pressed. This will change the characters speed and also the animation played while the key is pressed. Because the speed might be different under certain circumstances I would like the animation to have a variable framerate dependant on the speed of the character at that moment. The default "Walking" animation works very well with varied speed but I need an extra custom animation that would also change the framerate dependant on speed. I imagine I could change the entire actor every time the player runs but this seems a bit sloppy. Does anyone know how to make a custom animation whose framerate is dependant on the speed of the character?

Thanks!! :)
- Kraven

User avatar
Mr.Numbers
001 Support
 
Joined: Wed Feb 28, 2007 1:50 am
Location: Alberta, Canada

Re: Animation framerate dependant on speed

Postby Mr.Numbers » Tue Apr 11, 2017 4:03 pm

Hmm, easiest option would be to just setup a second sprite and switch it out. The other way would be to use the "Play Pose(?)" custom event, the one that plays the animation once. This event allows you to determine the play speed of the animation. You have to run it in a loop though, and base the speed of the animation on the speed of the player.
Image
I AM THE ALL MIGHTY SCRIPTING MASTER
Please do not PM me with Engine 001 related questions, rather post on the forums. ;)

User avatar
Kraven4382
Member
 
Joined: Fri Jul 17, 2015 9:56 pm

Re: Animation framerate dependant on speed

Postby Kraven4382 » Sun Apr 16, 2017 6:14 am

Thanks, I'll give it a try :)


Return to Technical Support Questions

Who is online

Users browsing this forum: No registered users

cron