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.

DarkBASIC Discussion / Appending Animation

Author
Message
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 16th Mar 2004 18:57
For my Current game, I have made my character and am trying to animate him. I have made and saved two animations for him; walking and attacking.
The peice of code I am using at the moment looks like this:

How can I add it to loop "attack.dat" when you press spacebar?

Current Projects: 'Level Editor 3D' and 'Animation Package v2.0'
[email protected]
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 19th Mar 2004 15:31
Oh come on!
Somebody help or at least tell me if it is possible!

Current Projects: 'Level Editor 3D' and 'Animation Package v2.0'
[email protected]
sarin
21
Years of Service
User Offline
Joined: 20th Mar 2004
Location: nowhere
Posted: 21st Mar 2004 06:20
im not an expert at appending animations, (i just plain suk), but i think your problem is that darkbasic don't support .dat files. Unless u got dbpro, i dont think db supports .dat. however, i no it does support .3ds or .x files.

try loading your dude in another project. try one, then the other. if the .dat dont work, then get a converter or save it to a different file source.

Sarin
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 21st Mar 2004 15:26
The .dat extension is not the problem. The program above runs fine.
The problem is getting two animations appended to the same model.
The code is included so that you could see what I already have and then add whatever is needed.

Current Projects: 'Level Editor 3D' and 'Animation Package v2.0'
[email protected]
BearCDPOLD
21
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 21st Mar 2004 18:22
Try throwing in another APPEND OBJECT command.

IF spacekey()=1 then APPEND OBJECT "ninja.x","attack.x"

Or something along those lines.

Crazy Donut Productions
Current Project: KillZone
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 21st Mar 2004 19:53
Thanks i'll try that!
Won't that slow down the program?

Current Projects: 'Level Editor 3D' and 'Animation Package v2.0'
[email protected]
3beth
21
Years of Service
User Offline
Joined: 13th Feb 2004
Location: Good ole Kentucky
Posted: 22nd Mar 2004 05:32
Andrew,

I threw away the append command, it really sucks, I have been constructing characters with a 100 different poses tied into a timer call up program. I also never got any animations to work from dat files either, and I tried really hard to get them to work, I had hopes of making characters like in the sims game that way but I haven't been able to.

Beth

Beth
waffle
22
Years of Service
User Offline
Joined: 9th Sep 2002
Location: Western USA
Posted: 22nd Mar 2004 08:37
if using DBC or DBPro,
the issues are the same:

1 - DB assumes ninja.x is animated (perhaps the idle animation?)


2 - before appending animation, use the command
Get Total Object Frames() or something like that ...
Lets call this number Idle_End
use this number (or -1 from it) in the append object command

also, did you make the .dat file from the save animation command?
Which animations are included in the .dat file ?

3 - Then call Get Object Frames() again for the walk animation
and call this Walk_End

4 - Loop the animations ....
to loop the Idle Animation ...... loop object ninja,1,Idle_End
to loop the walk ......
Loop Object ninja,Idle_End+1,Walk_End


Watch out for the "gotcha" problems:
If the model (.X) have different limbs or bones or names or sometimes source textures, there will be errors in the animations.

internet gaming group
current project http://home.comcast.net/~norman.perry/Archon.html
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 22nd Mar 2004 15:22
Thanks to everyone but waffle's answer looks good.

Current Projects: 'Level Editor 3D' and 'Animation Package v2.0'
[email protected]
Guitarman
21
Years of Service
User Offline
Joined: 31st Jan 2004
Location:
Posted: 23rd Mar 2004 15:24
If its any easier(i agree with sarin on the no .dat files... try to find a .x file).....
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 23rd Mar 2004 16:12
The point is I made the character myself but can't work out how to use programs like JTEdit so I had to use Dark Basic and save the animation.

Current Projects: 'Level Editor 3D' and 'Animation Package v2.0'
[email protected]

Login to post a reply

Server time is: 2025-06-02 04:19:05
Your offset time is: 2025-06-02 04:19:05