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 / Need help expanding my project from the Camera3d examples program 3: third person camera in DB Classic

Author
Message
D18AGON
20
Years of Service
User Offline
Joined: 25th Sep 2004
Location:
Posted: 28th Sep 2004 16:52
Here is the code:


What i want help with is making it so when i press the right arrow key an anim of the man walking loads and plays. I also want to assighn a few other animations of the model to load and play when i press the assighned keys, so i can have him standing when i press nothing, walking when i press left or right key (not just having the first object anim "bruce standing.x" sliding around") and how to load other animations doing some other stuff like throwing different punches when i press different number pad keys.
I need to assighn an animation to each key.
Where and what would i type in this program to turn the desired result? Plz modify the code above, explain it and put it in your reply to make an example.
all help it GREATLY appreciated!
Lukas W
21
Years of Service
User Offline
Joined: 5th Sep 2003
Location: Sweden
Posted: 29th Sep 2004 17:10 Edited at: 29th Sep 2004 17:12
if I understanded your question correct:

to load an animated object and append it to and object you use this:
append object object number , filename$ , startframe , endframe

then you need to check if a key is pressed, like this:

if upkey()=1 then forward=1 else forward=0
if leftkey()=1 then left=1 else left=0
if forward=1
loop object object number , walk frame start , walk frame end
endif
if left=1
loop object object number , strafe frame start , strafe frame end
endif
if forward=0 and left=0
loop object object number , idle frame start , idle frame end
endif


I am not cool anymore... or am I?
http://n0id.proboards28.com/index.cgi - please join
D18AGON
20
Years of Service
User Offline
Joined: 25th Sep 2004
Location:
Posted: 30th Sep 2004 06:38
Thanks a heap, I actually got this worked out anyway, I just have to work on the next part now which is assighning different animations to different keys on the num pad.
i was thinking of using if inkey$()="7" then load object 1 "filename.x", 1 but i'm not quite sure about this, any help would be appreciated.

Login to post a reply

Server time is: 2025-05-24 17:43:12
Your offset time is: 2025-05-24 17:43:12