I'm making as scratch game and it's an assignment for school. I have a variable called score and i want it to broadcast the next level but it won't work. I've tried If Score=20 broadcast level 2 and then i did the whole receive thing but i still can't get it to work. This probably makes no sense but yeah lol...
when space key clicked if variable=20 broadcast level 2
Offline
rainzy wrote:
I'm making as scratch game and it's an assignment for school. I have a variable called score and i want it to broadcast the next level but it won't work. I've tried If Score=20 broadcast level 2 and then i did the whole receive thing but i still can't get it to work. This probably makes no sense but yeah lol...
when space key clicked if variable=20 broadcast level 2
What is the space key's funtion? Start the game, end it ect. If you know what i mean
Offline
Willpower wrote:
rainzy wrote:
I'm making as scratch game and it's an assignment for school. I have a variable called score and i want it to broadcast the next level but it won't work. I've tried If Score=20 broadcast level 2 and then i did the whole receive thing but i still can't get it to work. This probably makes no sense but yeah lol...
when space key clicked if variable=20 broadcast level 2What is the space key's funtion? Start the game, end it ect. If you know what i mean
it starts level 1
Offline
That is what i wanted to hear! you have forgot a "forever" between the space key and the variable. You need it because otherwise when space is pressed it sees if score is equal to 20 and it's not and then it stops that script- you want it [b]forever[b/] asking if score equals 20 on level one
This is the new script
when [space v] key pressed forever if <variable=[20]> broadcast [level 2 v]
Last edited by Willpower (2012-10-30 04:44:49)
Offline