I’ve randomly generated 8 enemies, but only 1 is moving and I’m not sure why.
also, there is a random sprite for my fireball projectile in the upper left corner and I don’t know how it got there.
I’ve randomly generated 8 enemies, but only 1 is moving and I’m not sure why.
also, there is a random sprite for my fireball projectile in the upper left corner and I don’t know how it got there.
You’re using the myEnemy
variable in your for-loop, which only points to the last created bug. Try dragging out the value
variable from the for-loop instead
thanks! That fixed it. any ideas about that random fireball sprite sitting in the corner?
@G-type what’s the fireball supposed to do? Also, can you share your code? Here’s a gif showing how to do it:
That is because you’re using the “value” variable on a block input area which requires a sprite-type variable to function properly. The “value” variable is defined as a kind-type variable.
My suggestion?
Rework the Enemy Spawning System, make multiple on-element blocks in which each block has it’s own array of “tile” locations so it can spawn enemies in which you can define the type.
I’m pretty sure you don’t really know what I mean, I can make a simulation if you want.
That block assumes “value” is a sprite, not a variable holding a sprite type, so you can only put sprites in that block. If you want to do what you are trying to do, you would have to use the small block at the bottom of the “Lifecycle” section in the Sprites tab, the one under the “array of sprites of kind (player)” block. You would use it inside a “set [variable] to ()” block, kinda like this:
set [value] to ( ([player]) )
Hope this helps! Sorry for the weird block explanations, I’m too lazy to grab screenshots of everything