Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Play Object Animations at Constant speed

Author
Message
luskos
17
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 19th Jun 2010 17:05
I`m using psionic`s free dwarf model while building and testing animations and movement.I`m using loop object and play object and i can set object speed but i can`t figure this how can i do it timer based.Because as i know this is the only way to do it at constant speed.Even with locked frame rate and vsync option on, it`s attack animations are played way too fast.

I get some slight hint that this can be done with set object frame

I didn`t find much in the forums with : set object frame search.

If someone knows if there was discusion somewhere, please share.

Coding is My Kung Fu!
And My Kung Fu is better than Yours!
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 19th Jun 2010 18:39
What modeling software are you using? I use Milkshape, and animation speeds can easily be changed within it. Coupling this with SET OBJECT SPEED has worked for me.

You could manually change the object's frame using a timer, but that seems like a lot of unnecessary effort.


luskos
17
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 19th Jun 2010 21:19
SET OBJECT SPEED worked fine for most of the animations in the object, is it possible somehow only attack animations to have diferent speed?

I`ll open the object with Milkshape to see how it plays the attack animations within it and try to change their speed if the problem is in them, else i need to check my code.It`s possible i made some stupid mistake or missed something.

The problem is with attack animations which are triggered at random by mouseclick.So the problem maybe is there, i really need to check the code when i get home.

Coding is My Kung Fu!
And My Kung Fu is better than Yours!
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 20th Jun 2010 15:28 Edited at: 20th Jun 2010 15:29
I used this snippet in conjunction with my TBM code to animate objects at a constant speed on any PC.



LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 20th Jun 2010 16:37
Quote: "is it possible somehow only attack animations to have diferent speed?"


From Milkshape, you can only set one animation speed in an exported file. What about changing the animations frames within Milkshape? (i.e. if you are using 15 frames for a particular animation, why not change it to 10 (or 20, depending on whether you want it to go faster or slower)?

You could manually assign the frame speed within the game and keep track of it, but this is a hassle and is hard to track, so I would not recommend it.


Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 21st Jun 2010 16:35 Edited at: 21st Jun 2010 16:36
You could SET OBJECT SPEED to a different value during the attack animation, and then change it back afterwards.

As for timer based movement, just multiply the speed by your movement constant (usually factor# or something like that).

Login to post a reply

Server time is: 2024-09-28 18:19:48
Your offset time is: 2024-09-28 18:19:48