How to make a change scene button appear
cjb695
Member Posts: 5
I am creating a brick breaker type of game and i want a way to change scene, i have created it but it appears at the beginning and i want it to appear after the gamer beats the level....any help with be appreciated.
Comments
1. When the game reaches 'end of level', spawn a change scene button at X,Y relative to scene
2. When the game reaches 'end of level', move the change scene button onto the screen from 'off' the screen.
The latter is more efficient, though not always wonderful.
Make a new actor and call him (er, or 'her') "end of level control".
Create a rule that checks for the end of the level. In your case I'd imagine 'if blocks = 0"
Then drag into the rule either a 'Spawn' behaviour or a 'Move to' behaviour.
Behaviour's are found in the behaviour tab underneath the inspector window (where you can see all your game's actors).
Hope that helps,
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
Create a rule that checks for the end of the level. In your case I'd imagine 'if blocks = 0"
When that happens, your level effectively 'ends' and you want to move on to another screen.
Hope that helps,
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
These can be levels, option pages, title pages etc etc
If you think about your breakout game, there must be, as in most games, elements of risk and reward and the chance of failure.
What is the goal of your game? What would stop you doing that? Do you have lives? What happens to make you lose a life? If you lose all your lives, then that would be game over, right?
So you have to work out what you want the 'game over' conditions to be. Then when these happen, usually done through 'rules' in GS, go to the game over screen (which is one you'd make from the Home panel - see above).
I hope that helps. Sorry if I've misunderstood you in any way, it's not intentional - just trying to help!
Cheers,
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
It's also linked to at the top of this page!
Within these hallowed pages you'll find:
How to change a scene: http://gamesalad.com/wiki/how_to_gsc_change_scene_button
How to display lives: http://gamesalad.com/wiki/how_to_gsc_display_lives
To actually 'make' lives, just make a new variable. Click on the 'Attributes' tab in the main panel on the left where your actors are.
Add a new integer variable called 'Lives' - or whatever you want to call it.
Give this the value '3' or however many you want to give.
When something happens that makes your player lose a life put in a 'change variable' behaviour into the relevant actor.
For example, in your breakout game, you may want to make the player lose a life every time the ball gets past him.
So on the ball actor, have a rule that says:
if self.position y is less than or equal to 0
Then change behaviour lives to lives-1
Then, make another actor, let's call him 'control' and put him out of sight off the screen.
On him, place a rule that says:
If lives equals or is less than 0
Then change scene to Game Over.
Hope that helps,
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io