Random Monster Spawning?
I'm working on a Endless runner type of game but how can i make it so the monsters spawn on different positions?
Best Answer
-
tatiang Posts: 11,949
Just set a range for the y value (or x). You can do this with random(game.playerX+50,game.playerX+150).New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Answers
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
When I can't figure something out, I Google "[topic] GameSalad" and I almost always find that the first few results are a video tutorial that's very helpful.
For example, I typed "random actor GameSalad" into Google and the first result looks perfect for you: http://www.google.com/search?client=safari&rls=en&q=random+enemies+gamesalad&ie=UTF-8&oe=UTF-8#sclient=psy-ab&hl=en&client=safari&rls=en&q=random+actor+gamesalad&oq=random+actor+gamesalad&aq=f&aqi=&aql=&gs_l=serp.3...2078.2626.1.2735.5.5.0.0.0.3.263.693.2-3.3.0...0.0.fY3PxQymyZ4&pbx=1&bav=on.2,or.r_gc.r_pw.,cf.osb&fp=6c6732b964ca4769&biw=1209&bih=764.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
And as far as movement goes, you could just use a Move behavior on each enemy that makes them move down (angle=270) at a certain speed. It all depends on how you want your game to work.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User