You can use variables and once the script finishes you can change it by 1.
Offline
Create a variable called score (or whatever you want to call it), and then whenever whatever you want to make the score go up happens, change the score variable by 1.
So if you wanted to make it so that if the main sprite touched a coin then the score when up by one, your script would look like this:
when green flag clicked
forever if touching color gold
change variable score by 1
And also make sure you have a script on the coin making it hide when it touches the main character.
Offline
LFCm4d227 wrote:
Create a variable called score (or whatever you want to call it), and then whenever whatever you want to make the score go up happens, change the score variable by 1.
So if you wanted to make it so that if the main sprite touched a coin then the score when up by one, your script would look like this:
when green flag clicked
forever if touching color gold
change variable score by 1
And also make sure you have a script on the coin making it hide when it touches the main character.
you can change touching colour for touching[coin v] or whatever you would have the coin sprite named.
Offline
DigiTechs wrote:
LFCm4d227 wrote:
Create a variable called score (or whatever you want to call it), and then whenever whatever you want to make the score go up happens, change the score variable by 1.
So if you wanted to make it so that if the main sprite touched a coin then the score when up by one, your script would look like this:
when green flag clicked
forever if touching color gold
change variable score by 1
And also make sure you have a script on the coin making it hide when it touches the main character.you can change touching colour for touching[coin v] or whatever you would have the coin sprite named.
Yes, but say you had over 100 coins, that would mean either a lot of scripts or a lot of << <or> >>s!
Offline
<when green flag clicked>
<forever if> (situation)
<change{ score }by(any number)
Offline
LFCm4d227 wrote:
DigiTechs wrote:
LFCm4d227 wrote:
Create a variable called score (or whatever you want to call it), and then whenever whatever you want to make the score go up happens, change the score variable by 1.
So if you wanted to make it so that if the main sprite touched a coin then the score when up by one, your script would look like this:
when green flag clicked
forever if touching color gold
change variable score by 1
And also make sure you have a script on the coin making it hide when it touches the main character.you can change touching colour for touching[coin v] or whatever you would have the coin sprite named.
Yes, but say you had over 100 coins, that would mean either a lot of scripts or a lot of << <or> >>s!
No! You could make a variable called i and change it by 1 until it reaches the last coin.
Offline
create a veribale and then use <change{ variable }by(
and <set{variable }to(
Offline
errm just use change variable by ()
Offline