Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: Sprite sound problem  (Read 3097 times)

0 Members and 1 Guest are viewing this topic.

plobone

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 17
    • View Profile
Sprite sound problem
« 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!:)
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Sprite sound problem
« Reply #1 on: January 25, 2012, 09:34:35 PM »

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.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

plobone

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 17
    • View Profile
Re: Sprite sound problem
« Reply #2 on: January 26, 2012, 07:49:42 PM »

Thank you very Mnemonic!
I think Ill try the first option!:)

Logged

plobone

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 17
    • View Profile
Re: Sprite sound problem
« Reply #3 on: January 26, 2012, 08:33:26 PM »

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!
Logged
 

Page created in 0.035 seconds with 20 queries.