Need help in my new game

nir3112nir3112 Member, PRO Posts: 312
edited March 2015 in Working with GS (Mac)

Hi,
I'm trying to create a path and the player have to move the ball on the path but without falling from it and i cant do 2 thing:
1. I want to create random paths every time (with turns, start/stop etc..) without needing to build a new level every time
2. How do I stop the game when the ball is out of the path?
Thanks!

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    1. You'll need to think of an algorithm (unless someone suggests one you can use) for this. What comes to mind immediately is starting at one "grid square" and spawning a "path" actor and then moving the spawner actor up one grid square distance and spawning another path actor and then moving up again and spawning another path actor and then using a random value to determine how often to move left or right along the grid instead of up (e.g. 20% of the time). You'll need a loop or timer to achieve a full path.
    2. When [ball] actor collides with path actor [no behaviors]; Otherwise Change Scene, etc.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.