1
Ask a Question / Re: Play sound based on list version 3.0
« on: April 02, 2014, 07:35:35 pm »
So what you're trying to do is store the names of the sounds you want to trigger in a list as text? That's a cool idea, but I don't think it will work directly because the block that triggers a sound doesn't accept text as it's input like, say, the switch animation blocks.
I think its possible, however, to create a list that references the actual sound objects, and not just the text name of the sound. The only way i could figure out how to do this, however, was to make an attribute of type "Sound" for each of the sounds you want included in the list. Then set the default value of the these sound attributes to each of the sounds you've imported into stencyl. Then you can add those sounds to the list and reference them directly.
Either way, it seems kind of clunky. Its probably easier just to reference the sounds directly.
I think its possible, however, to create a list that references the actual sound objects, and not just the text name of the sound. The only way i could figure out how to do this, however, was to make an attribute of type "Sound" for each of the sounds you want included in the list. Then set the default value of the these sound attributes to each of the sounds you've imported into stencyl. Then you can add those sounds to the list and reference them directly.
Either way, it seems kind of clunky. Its probably easier just to reference the sounds directly.