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 / attack animation

Author
Message
steve c
21
Years of Service
User Offline
Joined: 30th Jan 2004
Location: united kingdom
Posted: 15th May 2004 14:50
can somone tell me how to when the enemy gets close enoughto you he play the attack animation and when hes waliking towards you he lpays the waliking animation

i used to be indecisive but now ime not so sure
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 15th May 2004 15:26
you start off with the walk animation loaded, then apppend the attack animation to it, then when you want him to walk then do

play object objnum,1,end_walk_frame

and when you want him to attack then do

play object objnum,end_walk_frame+1,last_frame_of_models_anim

you can find how many frames are in a model animation with the function

total object frames(objnum)

that returns the number of frames in the model, so get the number of frames for the loaded walk animation, then append the attack animation and get the total number of frames again, the number of attack frames is the last number you got minus the first, you know the last frame is the number of frames in the first animation, so you can just use these values to animate the model correctly, cheers.

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.
steve c
21
Years of Service
User Offline
Joined: 30th Jan 2004
Location: united kingdom
Posted: 15th May 2004 21:33
thanks mentor

i used to be indecisive but now ime not so sure

Login to post a reply

Server time is: 2025-05-23 19:38:52
Your offset time is: 2025-05-23 19:38:52