Wintermute Engine Forum
Wintermute Engine => Technical forum => Topic started by: plobone on January 25, 2012, 07:13:14 PM
-
hello wintermuterssss
here is my problem:
I've got a scene with one entity.
The entity inside it has 6 sprites, all the sprites have a specific sound(I linked the sounds within the sprite editor)
the entity is like a switch or a knob every time you click on it, change sprite and make a sound.(I manage to do this with a script that I found here: http://forum.dead-code.org/index.php?topic=2946.msg18609#msg18609 )
But the thing is that every time I get inside the scene, the first sound of the first sprite of the entity plays.(without click on the entity)
If you could tell me away to fix this. I've tried several things that I found here...but I'm not really good in codeing.
Thank you all for your time!:)
-
Well the easiest solution I can think of is to have a separate sprite for the initial state, without any sound.
A cleaner solution, IMO, would be to play the sound from the script that changes the sprites, not embedding the sound in the animation.
-
Thank you very Mnemonic!
I think Ill try the first option!:)
-
Fixed!
I've set the entity with the sounds inactive and placed infront of it another entity with no sounds active.
When you click the entity with no sound you make it inactive... and you load into the scene the entity with the sound.
Thanks again!