Game Development Community

Check to see if anything is playing

by JD Scogin · in Torque 3D Beginner · 06/29/2013 (8:32 pm) · 1 replies

Using SFX sound, does anyone know how to test to see if anything is playing? I have a sound that plays on collision with an object (item), but I don't what it to keep starting over if it is hit more than once. So if I can check to see if anything is playing, and then not play if it is, that would work. Just can't figure out how to test if anything is playing. Thanks

#1
06/30/2013 (3:59 am)
the ~ button should get you into consol mode during in game and if you put some echo((you variable etc goes here) @ "Has started playing"); checker in your sfx function call then that should do it :o)

edit:

Oh I see so basically what you need is to check for some condition is true or false and then decide what should happen next(check the Torque 3D Development Cookbook, chapter 6 page 211, that should spark some ideas).

Also triggers can be a great thing to use here.