Need help with Brick Breaker game
rajit.garg11
Member Posts: 11
I making this brick breaker game, but sometimes the ball moves either straight up and down or horizontally. This causes the player to be messed up. How do I make a rule that when this happens the ball changes directions?
Comments
Rule:
if Self.Motion.Linear Velocity.X = 0
Change Attribute Self.Motion.Linear Velocity.X to [something else not 0]
For the [something else not 0] you could use the random function to pick a random number so it does not always do the same thing.
Hope that helps.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Complete Guide to iOS Publishing {} Complete Guide to Mac Publishing
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Simple debugging, but usually helps find the problem quickly.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
Please don't create multiple threads for the same question.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
To make this work in a pong game you'd want to use the rules I have set up that are triggered by the space bar, to be triggered when the ball hits a wall or a paddle.
Hope this helps.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page