Hello, is it possible to automate the creation of sprites in such a way that you can name them as “[name] + [number]”? For example, in this game we want to create sprites that represent notes in a Dance Dance Revolution style game. However, we don’t want to hard code hundreds of sprites each with the names incrementing “note1”, “note2”, “note3”, etc. Is there any way to achieve this?
We have tried declaring and calling notes in the format,
var note + x = createSprite(100,100); and other similar formats like,
var “note” + “1” = createSprite(100,100); but these only result in an error.
Assuming that we get declaring the sprites working, how would we go about calling a specific sprite to change it’s animation?
Here is the game, though not much of it is in working order yet so there is little to see