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 / Animation question

Author
Message
Francesco
20
Years of Service
User Offline
Joined: 11th Apr 2004
Location: Milan, Italy
Posted: 16th May 2004 16:26
If I have an object and append to it an animation, how do I append another animation to it after something else happens(for example: I append to a character an animation that makes him walk, then, if the character dies, I append another animation to make him fall down). I already tried just appending over the other animations but it says to me that "the append frame must be greater than models total frame count". Hu?? Does that mean something to any of you?
Please help!
Thanks

Non si inalberi mica con me, sa!
Lei è venuto qui, lei ha il tombino intasato!
Siamo uno spurgo serio, noi!
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 16th May 2004 17:15
if your model has 100 frames, then you append at frame 101, DB won`t let you overwrite the last frame of the model, all you do is load and append all the animations your model will want and then call them as needed, you sound to be loading them on the fly, that will slow down the game a lot (this may not be noticable in some games though), load them before the main game loop to maintain speed, what the computer is telling you is that the current model had say 50 frames, you appended 50 frames (51 onwards), and then you tried to write over those frames with the next load, but as far as DB is concerned they are all the same models animation, so you use object frame() to find out how many frames the model currently has, then you append the next animation onto the end of that (so if it returns 127 then you append at 128 onwards), then by keeping track of all the animations frames appended to the model you can play any of them at any time, eg if you add in walk/run/crawl/duck/jump/shoot then you can play any of those sequences as you need to, the frames may be something like this

walk 1-20
run 21-36
crawl 37-49
duck 50-58
jump 59-67
shoot 68-79

so to walk you play or loop frames 1 to 20, if you then want him to duck then play frames 50 to 58, if he then runs for cover play frames 21 to 36 etc, hope that makes things clearer.

Mentor.

PC1: P4 hyperthreading 3ghz, 1gig mem, 2x160gig hd`s, Nvidia FX5900 gfx, 6 way surround sound, PC2: AMD 1.2ghz, 512mb ram, FX5200 ultra gfx, stereo 16 bit soundblaster, ups.
Francesco
20
Years of Service
User Offline
Joined: 11th Apr 2004
Location: Milan, Italy
Posted: 16th May 2004 17:43
Thanks, think I've got that. Now all I have to do is try it.
Thankyou!

Non si inalberi mica con me, sa!
Lei è venuto qui, lei ha il tombino intasato!
Siamo uno spurgo serio, noi!

Login to post a reply

Server time is: 2024-11-26 17:37:20
Your offset time is: 2024-11-26 17:37:20