To swith backgrounds is quite simple All you need to do is create a new Stage and then add scripts to change the backgorund at certain points (Sending and recieving broadcasts) and to change the sprite you can just change the costume of the sprite by doing something like <when green flag clicked><switch to costume[ or something similar! Let me know if you need more help
Offline
There are two methods. Either:
When the player sprite teachers the end of the level, you broadcast 'level complete'. This sends a sort of message to all other sprites, so you could then put this on the stage:
When I receive 'level complete'
Next costume
The other way is to create a variable called 'level'. Make it so that when the player finishes the level, the variable changes by 1. You can now put this scripts for the stage:
When green flag clicked
Forever
If level = 1
Switch to costume 'level1
End if
If level = 2
Switch to costume 'level2'
End if
Of course, you would probably have more ifs than that (you need the same amount as the number of levels).
Or, to save having to put in loads of 'ifs', just put:
When green flag clicked
Forever
Switch to costume join level|'level'+1
End forever
In the join bit, the level inside the ' ' marks is the variable level, and the other you
Just write level. Just make sure you name the costumes 'level1' and 'level2'.
Offline
Dediaa wrote:
I have made a button and when it is clicked I want it to go to the first level
Put this script on the button:
When button clicked
Broadcast start level 1
Then on the stage:
When I receive start level 1
Switch to costume level1
Offline
Dediaa wrote:
ok but how do you recieve a broadcast
In the control category, there's a block shaped like the wheen green flag clicked, but called when I receive.
Offline
RedRocker227 wrote:
There are two methods. Either:
When the player sprite teachers the end of the level, you broadcast 'level complete'. This sends a sort of message to all other sprites, so you could then put this on the stage:
When I receive 'level complete'
Next costume
The other way is to create a variable called 'level'. Make it so that when the player finishes the level, the variable changes by 1. You can now put this scripts for the stage:
When green flag clicked
Forever
If level = 1
Switch to costume 'level1
End if
If level = 2
Switch to costume 'level2'
End if
Of course, you would probably have more ifs than that (you need the same amount as the number of levels).
Or, to save having to put in loads of 'ifs', just put:
When green flag clicked
Forever
Switch to costume join level|'level'+1
End forever
In the join bit, the level inside the ' ' marks is the variable level, and the other you
Just write level. Just make sure you name the costumes 'level1' and 'level2'.
For a new scratcher, that's a lot of information. Keep posting like this, and you'll be a scratcher in no time!
Offline
Dediaa wrote:
im making a angry birds game. How do i get the bird to hit the blocks and pig
Shoot it there?
Offline
owetre18 wrote:
RedRocker227 wrote:
There are two methods. Either:
When the player sprite teachers the end of the level, you broadcast 'level complete'. This sends a sort of message to all other sprites, so you could then put this on the stage:
When I receive 'level complete'
Next costume
The other way is to create a variable called 'level'. Make it so that when the player finishes the level, the variable changes by 1. You can now put this scripts for the stage:
When green flag clicked
Forever
If level = 1
Switch to costume 'level1
End if
If level = 2
Switch to costume 'level2'
End if
Of course, you would probably have more ifs than that (you need the same amount as the number of levels).
Or, to save having to put in loads of 'ifs', just put:
When green flag clicked
Forever
Switch to costume join level|'level'+1
End forever
In the join bit, the level inside the ' ' marks is the variable level, and the other you
Just write level. Just make sure you name the costumes 'level1' and 'level2'.For a new scratcher, that's a lot of information. Keep posting like this, and you'll be a scratcher in no time!
Even though my status is New Scratcher, I've been using Scratch for over 6 months, I just didn't sign up until recently!
Offline
RedRocker227 wrote:
owetre18 wrote:
RedRocker227 wrote:
There are two methods. Either:
When the player sprite teachers the end of the level, you broadcast 'level complete'. This sends a sort of message to all other sprites, so you could then put this on the stage:
When I receive 'level complete'
Next costume
The other way is to create a variable called 'level'. Make it so that when the player finishes the level, the variable changes by 1. You can now put this scripts for the stage:
When green flag clicked
Forever
If level = 1
Switch to costume 'level1
End if
If level = 2
Switch to costume 'level2'
End if
Of course, you would probably have more ifs than that (you need the same amount as the number of levels).
Or, to save having to put in loads of 'ifs', just put:
When green flag clicked
Forever
Switch to costume join level|'level'+1
End forever
In the join bit, the level inside the ' ' marks is the variable level, and the other you
Just write level. Just make sure you name the costumes 'level1' and 'level2'.For a new scratcher, that's a lot of information. Keep posting like this, and you'll be a scratcher in no time!
Even though my status is New Scratcher, I've been using Scratch for over 6 months, I just didn't sign up until recently!
Oh, okay.
Offline
OK, then i think you would need to have a sprite for the slingshot band with a script of
If(band) clicked
if (mouse down)= true
go to mouse pointer
if mouse pointer x<maximum slingshot pull
go to maximum slingshot pull
if mousepointer x>minimum slingshot pull
go to minimum slingshot pull
then do the same with the Y
if mousepointer down=false
go to starting position
broadcast shoot
I didnt put in the values because i did not know where your slingshot would be positioned
Offline