I would provide the game but due to it’s explicit language, I’ll abstain.
I have a code that randomly generates a random sentence:
on (release) {
result = a[random(a.length)]+" "+b[random(b.length)]+" "+c[random(c.length)]+" "+d[random(d.length)]+" "+e[random(e.length)]+" "+f[random(f.length)]+" "+g[random(g.length)]+" "+h[random(h.length)]+" "+i[random(i.length)];
}
Now on every word, I have a sound clip that I want to play, but how would I code it? I don’t know I would I would assign a sound to a word or how to incorporate it into the coding above.
Wouldn’t this work?
if(name == "example"){
mysound = new Sound();
mysound.attachSound("example");
mysound.start();}
}