I have a doubt about the sound component. is possible to change the .wav file from component in script, to make things more dynamic ?
exemple:
but this return me a error
imagine that i need to create 50 differents objects in game each object has a unique sound, i can use a factory to create and change the texture for each object. but and about the sound ? its possible to change the componente audio file for each object ? or i need to create each sound component manualy ?
You need to create the components manually in the editor (or open the .collection/.go file in a text editor).
I would recommend that you put all sounds in a single game object that is always loaded. Your game objects can then play the sounds they need from this game object:
-- elixir.script
sound.play("allsounds#wand")
The benefit of having all sounds on one game object is that you can stop all sounds at once: