Spawning actors from outside the screen
peterraad
Member Posts: 56
Hello once again . The same game that I'm making which involves a spaceship moving around the screen shooting enemies that spawn randomly from outside the screen coming in towards the ship. My issue is that Im trying to see how I should do this but Im not sure where to start. Should I make a new actor that spawns the enemies?
Comments
@peterraad Yes, make an actor that spawns the enemies. In the spawn behavior, set the x and y positions (relative to scene) beyond the edge of the scene. If you have scene wrapping on, it's easier but without it you can either have separate spawner actors for each edge of the scene or you can work out a rule that changes an attribute to a random number such as random(1,4) and then spawns in a certain area based on the result.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User