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 / Delaying an animation?

Author
Message
Doremar
20
Years of Service
User Offline
Joined: 30th Dec 2003
Location:
Posted: 27th Jan 2004 20:58
Anyone know how to delay the playing of an animation without pausing the game loop?

See, I've got this model that needs to die. I have all kinds of different attack animations that take different amounts of time to culminate in a death blow, and I need the death animation to be timed to look like a reaction to the death blow depending on the attack. It looks kinda silly to have him fall on the ground and start bleeding all over the place spontaneously, ya know?

Anyway, if there's any way to just tell an animation to play in x loops or something, I'd love to hear it

Thanks in advance!

A Cloaking Robe of Elven-Kind hangs in my wardrobe behind
All those things that mother said were proper for a boy
Doremar
20
Years of Service
User Offline
Joined: 30th Dec 2003
Location:
Posted: 27th Jan 2004 23:50
Nevermind, I have a solution now =)
I was having trouble mostly because I was attempting to make use of for i=1 to 100/next i as a combat loop, and then when I got it working I realized that I was basically pausing the game anyway since it seems to continue looping back on itself until it's out of i values.

In case anyone is curious, now I'm creating a combat loop by declaring and incrementing the value i (as part of the main program loop) whenever something is engaged in combat, and then I can use different values for i to time various events (like animating attacks/blocks, and everything else for that matter).

i=i+1
if i=201 then i=1
if i=100 then play object 1,31*beastframe#,50*beastframe#
if i=1 then play object 1,51*beastframe#,75*beastframe#

Fun stuff. Man I so can't wait to get this game going.

A Cloaking Robe of Elven-Kind hangs in my wardrobe behind
All those things that mother said were proper for a boy
Blinn
20
Years of Service
User Offline
Joined: 25th Jan 2004
Location: Behind a keyboard... pffft Duhh!
Posted: 29th Jan 2004 00:16
What may i ask do you use for these animations? I have access to Flash MX but i am annoyed to hear that you cannot import .SWF files into your game

So what do you use for the anims?

Good night, good morning, good day? whats so good about it?!?!?
Doremar
20
Years of Service
User Offline
Joined: 30th Dec 2003
Location:
Posted: 29th Jan 2004 01:16 Edited at: 29th Jan 2004 01:26
I create my models/bones in MilkShape and export them as MilkShape 3d ASCII files, then import them into CharacterFX to do the animation. CharacterFX exports nice clean .x files for use in DBP.

It may not be state-of-the-art software, but it gets the job done and it's very cheap (Character FX is free, Milkshape is what, $20?) =)

Are you sure you can't export any usable formats from Flash though? That seems kinda sad. You generally want .x (DirectX) files for DarkBASIC, but apparently 3ds is also supported.
If not, CharacterFX can import Autodesk (.3ds), milkshape 3d ascii and WaveFront files (.obj), so if you can export any of those from Flash you can probably work something out.
Milkshape can import dozens of file types, so that may be a workable direction to go too...

A Cloaking Robe of Elven-Kind hangs in my wardrobe behind
All those things that mother said were proper for a boy

Login to post a reply

Server time is: 2024-11-26 01:50:14
Your offset time is: 2024-11-26 01:50:14