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 / Playing an objects animation?

Author
Message
mike5424
17
Years of Service
User Offline
Joined: 30th Mar 2009
Location:
Posted: 18th Apr 2010 10:23

Frames 2-25 are a walk cycle, I need to play it when the player is pressing W. At the moment nothing happens, Any help?

---
Rudolpho
20
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 18th Apr 2010 10:57 Edited at: 18th Apr 2010 10:58
It will just keep starting over at frame 2 each time you call the play object command.

This should work:


I also used Loop object as it will keep the animation looping instead of just playing it through once.

mike5424
17
Years of Service
User Offline
Joined: 30th Mar 2009
Location:
Posted: 18th Apr 2010 11:12
No luck :S It stays on one frame.

---
Latch
20
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 18th Apr 2010 12:44 Edited at: 18th Apr 2010 12:47
@mike5424
Hello,

It looks like it's a 3ds object, which isn't really compatible with DBPro any more. Secondly, depending on where you got the model or from which 3d app you exported it, it may not have any animation keys.

What happens if you just

loop object 1 ?

If it doesn't play, then there likely isn't any animation in the file.

Otherwise, a slight change to yours and Rudolpho's code:



Enjoy your day.
NickH
18
Years of Service
User Offline
Joined: 19th May 2008
Location: Nova Prospekt, North Yorks, UK
Posted: 18th Apr 2010 13:15 Edited at: 18th Apr 2010 13:16
Try loading the object then printing to the screen the number of frames to see if it does have frames using TOTAL OBJECT FRAMES(Object Number)
mike5424
17
Years of Service
User Offline
Joined: 30th Mar 2009
Location:
Posted: 18th Apr 2010 15:21
Thanks guys! Looks like 3DS max didn't export the animation data :\ Well, Now i know i think i'll be able to fix it Thanks again!

---

Login to post a reply

Server time is: 2026-07-26 07:36:06
Your offset time is: 2026-07-26 07:36:06