Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
I have the song names stored in variables,
But I cannot figure out how to play them.
How do you make the play action reference the string in the variable?
<img src="http://www.550pm.com/temp/Construct2-SoundFromVariable.png" border="0" />
Develop games in your browser. Powerful, performant & highly capable.
Audio File Name should just be the variable name. like Song7 (no quotes)
I just tested it and it seemed fine. Unless you are trying to do something trickier?
Example CAPX
Sound Play By Name
I see what you're trying to do.. have you tried using str("Song"&CurrentSong)?
Use a dictionary object
Add key "Song1" value "name of the song here"
Then
Play by name Dictionary.Get("Song"&CurrentSong)
Thank you 7Soul, that is exactly what I was looking for.
And what a handy object to learn about!