Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
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" />
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?
Sound Play By Name
Develop games in your browser. Powerful, performant & highly capable.
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"
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!