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 / Help with a .x file playing animation frames

Author
Message
mbaucco
18
Years of Service
User Offline
Joined: 6th Nov 2005
Location:
Posted: 11th May 2006 18:41
Hello,

I have the following bit of code in my main loop:



For some reason it will not play the combat animation, even though the idle and walking animations work fine. Currently, holding both mouse buttons moves the character forward, the down arrow moves him back, and if he single left clicks on the monster he should do his combat animation.

When I click on the monster it plays the attack sound, so I know it is executing the function that sets inCombat to 1 and the walking and walkBack variables to 0, but the animation simply will not play no matter what I do.

I'd be happy to post additional code if it is needed, and thanks in advance for any help!

-Matt
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 11th May 2006 22:59
seems like u are stopping and starting the animation all the time, i.e. it goes to work but has to stop before it gets anywhere.
you'll need to change this


life's one big game
spec= 2ghz, 1gb ram, 512mb gpu, directx 9.0c, dbpro and classic
The Nerd
20
Years of Service
User Offline
Joined: 5th Jun 2004
Location: Denmark
Posted: 12th May 2006 01:20 Edited at: 12th May 2006 01:23
Try change this:


to this:



-The Nerd

3D Arcade-like game:
SpaceBattle-Shootout
mbaucco
18
Years of Service
User Offline
Joined: 6th Nov 2005
Location:
Posted: 12th May 2006 17:40 Edited at: 12th May 2006 17:50
Thanks for the advice! I tried all the suggestions above and nothing worked.

However, once I set the inCombat variable to 1 inside the main loop it worked fine. I could have sworn I set up my doCombat function to return the variable properly, but I must have goofed somewhere.

Anyway, thanks again.

-Matt

Login to post a reply

Server time is: 2024-09-24 23:29:57
Your offset time is: 2024-09-24 23:29:57