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 / Playing .x models in DGSDK

Author
Message
roujesky
19
Years of Service
User Offline
Joined: 4th Jun 2004
Location:
Posted: 22nd Dec 2004 06:33
Starting a new thread because I think the new subject line is more descriptive...
I wrote a little app to step through a .x model frame by frame, but it does not work. I am new to Dark(anything). I would expect the code to "animate" my model, but my object does NOTHING...

I guess my problem is that I do not understand what dbLoopObject() and/or dbPlayObject() arguments mean. When dbLoopObject(2,0,650) is called in the game loop, does it start over every time it is called in the loop, or does it just spawn off a thread that runs forever?

Any help would be appreciated
Chris K
20
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 22nd Dec 2004 20:44
You just call it once, not every loop.
David T
Retired Moderator
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 22nd Dec 2004 22:00
Quote: " dbLoopObject(2,0,650) "


Loops an object between frames 0 and 650. You call it once and it sets off looping.

You can then stop it using stop object. Play object does the same, but doesn't loop back to the beginning when it gets to the end.

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 22nd Dec 2004 23:16
however, you don't have much control over the animation speed. I recommend using the objectframe() and setobjectframe() commands to make your own animation, it's much easier to control the animation rate that way!

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
roujesky
19
Years of Service
User Offline
Joined: 4th Jun 2004
Location:
Posted: 23rd Dec 2004 00:15
Thanx all! I now understand it a lot better. My object did not animate, but that was because I set the speed too low (2!, How was I to know??) Set it to 10000 and now I see it move!

I am thinking about cleaning up my little app and sending it to support so they can put it in their help files.

Login to post a reply

Server time is: 2024-03-28 23:16:57
Your offset time is: 2024-03-28 23:16:57