Hi, i recently making space-shooter like game, i have some trouble to randomly spawning my enemy from above of the screen. Please help! Sorry for my bad english.
If you want random position, use the expression Random() in place of position value. For example Random(800) going to return a random value in ranger 0-800. If you want a custom range then use the RandomInRange(min,max) expression.
If you want a random enemy, one way to do it is to put all your enemies into a group, name them like Enemy1, Enemy2…etc and then use the Create object from it name event. For object name enter “Enemy” + ToString(RandomInRange(min,max)) to pick a random enemy from the group by picking a random number in the name of the enemy object.