So I want to spawn enemies every 3 seconds ( which i know how to do ) but how do i spawn random enemies. So I have 3 different enemies, how do i spawn different one from the same spawn ( it must be the same spawn )
Thanks in advance.
You would have to have a number represent each enemy and have a global variable that holds a random generated number to choose which one to spawn. Then have a event for each possible number to tell it which one to spawn.
I would use local variable instead of a global one, because You only need it to spawn some objects on specific event and there's no need to have it available for entire project.
Develop games in your browser. Powerful, performant & highly capable.
You can also put the enemies into an "Enemies" family and pick them randomly either with the "pick random instance" expression or using the the "pick by evaluate" expression and a Family variable.
See attached file.
Yes local not global. I didn't recommend families cause they don't have a license from their profile info. Which isn't available in the free version.
Thanks, that really helped.