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.

Dark GDK / Animations and KeyStates

Author
Message
inthepast
15
Years of Service
User Offline
Joined: 12th Feb 2009
Location:
Posted: 15th Feb 2009 13:46
I'm trying to get my model to do its entire animation without me having to hold the key down.. (by just pressing the key once).

Code so far:


The animation for Key=17 (W) works fine as I want the animation to play whilst im holding the key.. But as for Key 57 (Space) and Key 2 (#1) I dont want to hold the key down for the animation to complete. I've tried dbPlayObject.. and it only plays the first frame then stops.

Maybe its a problem with the every so many else if statements.. if so how would I resolve this.. Thanks in advance.
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 15th Feb 2009 22:49
You may want to check to see if object is playing first.



This may be what your looking for, im not completely sure as I have not tested your code,

dbObjectPlaying() - Not sure if this is the command but it is something like this, check the documentation if it doesn't work.
prasoc
16
Years of Service
User Offline
Joined: 8th Oct 2008
Location:
Posted: 15th Feb 2009 23:08
the last "else {" is when you are not pressing anything, so if you press space it will start looping until it loops through again and it will stop.
inthepast
15
Years of Service
User Offline
Joined: 12th Feb 2009
Location:
Posted: 16th Feb 2009 09:31
Thanks matty.. dbObjectLooping worked fine for the walking sequences

Login to post a reply

Server time is: 2024-11-25 13:34:51
Your offset time is: 2024-11-25 13:34:51