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 / FX Playback During 3D Model Animation

Author
Message
anwserman
15
Years of Service
User Offline
Joined: 20th May 2011
Location: Wisconsin
Posted: 17th Jun 2011 09:27
I'm just currently developing artwork and modelling for my program, and I thought of an interesting question - can I trigger sounds to play during a certain point in an animation?

(In generic terms), let's say the walking cycle for a model of mine is from frames 30 to 70. When frames 40 and 60 are animated, I'd like a sound to play.

I really haven't programmed yet with DBPro to test this out. I've done programming in other SDKs before, but I'm not sure about DB Pro. Would Enhanced Animations be required for this?

Thanks!
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 17th Jun 2011 14:38 Edited at: 17th Jun 2011 14:40
Yes, just check "if object frame(obj)=40 or object frame(obj)=60", then when it equals the correct frame you can use "play sound".



anwserman
15
Years of Service
User Offline
Joined: 20th May 2011
Location: Wisconsin
Posted: 17th Jun 2011 20:28
So I will need Enhanced Animations then?
Also, there is no rare ing between frames... Like, i could never be at frame 40.3 in an animation?

Thanks!
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 17th Jun 2011 22:52
No need for advanced animations, it's built in.

The frame can be 40.3, so it's best to check like this:



TheComet

anwserman
15
Years of Service
User Offline
Joined: 20th May 2011
Location: Wisconsin
Posted: 17th Jun 2011 23:11
Thank you TheComet! That makes more sense.
Ok, I noticed with Extended Animations, it says something about 'same playback speed no matter what machine the app is running on'. So are the stock animations within DPPro not optimized for such playback? Or is it just a marketing gimmick :3 lol

Thank you all so much for the assistance!
revenant chaos
DBPro Master
19
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 18th Jun 2011 12:08
Nope the built-in animation commands (play object, loop object, etc..) work through iteration, and so the animation speed will change with the frame rate. Enhanced Animations is an awesome plugin since it can blend animations, but you can write your own timer-based animation system using the set object frame command.
anwserman
15
Years of Service
User Offline
Joined: 20th May 2011
Location: Wisconsin
Posted: 20th Jun 2011 11:26
Oh ok! Thank you for the help everyone!
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 20th Jun 2011 11:32
Quote: "The frame can be 40.3, so it's best to check like this"

I didn't know that... but I somehow managed without until I got Enhanced Animations

Login to post a reply

Server time is: 2026-07-10 22:54:54
Your offset time is: 2026-07-10 22:54:54