I'm making a game that involves 4 enemies. When spawning, one of the enemies will be chosen at random using an array.
The way i did this was by creating a sprite and within the sprite add 4 seperate animations(being the 4 enemies)
Then i coded the array as follows.....
On start of layout > Array > Enemies > Push Back "names of enemies" on X axis
and for spawning it and selecting the enemy i used the following
System > every random (1,2) > Create enemy > layer 1 at x , y
> Enemy > Set animation to > (Enemy.At( floor(random(Enemy.Width)) )
Now the problem is that when the enemy is created it should select one of the 4 enemies from the animation at random, which it does. However the enemy that is the default animation (the first animation/Main Sprite) is spawned much more frequently than the others??