Problem: I am not allowed to name an animation a simple number such as "1" or "34". It just reverts the name back to the previous one with no error message or reason why it doesn't work. I don't know if this is a bug or intended, I guess intended to stop certain stuff?
I want to spawn random background objects in my side scrolling game. The way I have been doing this is using tons of events and sprites each individually looking something like "if level = 1, Every random(3,6) seconds create object cloud1" etc...
Now I would like to make a big "BGobjects" sprite that contains tons of animations and frames for the various BG objects I need. I can simply name each animation 1 2 3 4... for each level they go into and do then the following:
Every random(3,6) seconds create object BGobjects
set BGobjects animation frame to Level (So on level 1, it will be all the level 1 objects, level 2 they'll all be level 2...)
set BGObject frame to choose (1,2,3,4) for the 4 different kinds of clouds that fit into level 1. Or the 4 different kinds of bubbles that fit the underwater level 2. Etc.
This would work seamlessly and use very few events, if only it allowed me to name the animations simple numbers in the first place...
The only theoretical workaround I can think of but have not tried yet is to simply call the animations fitting names such as "Clouds" "Bubbles" and then simply add a global variable called "AnimationHelper" and 4 events like (Level = 1, set AnimationHelper to "Clouds") (Level = 2, set AnimationHelper to "Bubbles")
And then just
set BGobjects animation frame to AnimationHelper
Same thing but a little more convoluted, should work though, right? Any better ideas? Any explanation on why I'm unable to name an animation a number? Thanks.