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 Professional Discussion / Character animation when attackin code- does this look ok??

Author
Message
Salsa
22
Years of Service
User Offline
Joined: 21st Sep 2003
Location:
Posted: 25th Sep 2003 19:53
I want my character to anmiate when i press the attack button, would the code be:

Does this look ok, so basically when the attack button is pressed it will first play the object and then if it collides.
Is that code ok?
Or is it:
Kentaree
23
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 25th Sep 2003 20:49
It would probably be the second one as the first snippet doesnt look for any input from the user. However, there's a few mistakes in the code, mainly that you have a variable called "attck animation", which is an invalid variable name, as there's a space in the name.

Also (although this depends on your animations), your object will play through all the frames it contains when using play object without any extra parameters to say at what frame to start and end, but if you have no other anims this wont matter. Also, you might want add a check if an anim is playing before you play another one, because overlapping animations look really bad. This might be done using:



Cheers,
Kentaree

I would be unstoppable if I could just get started...
Andrew
22
Years of Service
User Offline
Joined: 23rd Aug 2003
Location: United Kindom (what makes it important?)
Posted: 25th Sep 2003 20:50
Got a point to that LOL

I know my codes - i am now more advanced with DBP-
Ask me any question (um not to do with online though :0)

Login to post a reply

Server time is: 2026-07-25 07:01:27
Your offset time is: 2026-07-25 07:01:27