Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » how do u add levels to your game??
- TheGameDev_Inc
-
New Scratcher
1 post
how do u add levels to your game??
hey guys im making a clicker game and its going to be so fun but i dont know how to add levels im new to scrath and im going to start my coding career here and then i will move on but can i get some help please on how u add levels??
- Vaibhs11
-
Scratcher
1000+ posts
how do u add levels to your game??
This could be too big on a forum post
- The_Coded
-
Scratcher
20 posts
how do u add levels to your game??
You can add a variable that changes by 1 with every level, and a stage that constantly checks the variable to see which costume to turn to, and every time a level increases, the player gets reset to a set coordinate.
- kingkohli421
-
Scratcher
10 posts
how do u add levels to your game??
You can do this
when green flag clicked
if <<[level] = [2]>> then
switch backdrop to [level 2]
Last edited by kingkohli421 (Nov. 12, 2020 09:07:39)
- kingkohli421
-
Scratcher
10 posts
how do u add levels to your game??
You can do thisyou have to make a level variablewhen green flag clicked
if <<[level] = [2]>> then
switch backdrop to [level 2]
Last edited by kingkohli421 (Nov. 12, 2020 09:08:00)
- thelion5000
-
Scratcher
100+ posts
how do u add levels to your game??
You can do thisyou have to make a level variablewhen green flag clicked
if <<[level] = [2]>> then
switch backdrop to [level 2]
hey guys im making a clicker game and its going to be so fun but i dont know how to add levels im new to scrath and im going to start my coding career here and then i will move on but can i get some help please on how u add levels??
you can do what kingkohlli42 said and if you have a score variable then you can make adjustments like in level 1, you get 1 point for clicking a balloon and in level 2, you can get 2 points for clicking a balloon. to do this you have to do what i did below. the when i recieve balloon clicked level 1 broadcast is when you touch the balloon while you are in level 2 so that is why i put if level = 2 then to block to make sure that you earn a point if you are in level 1 or 2 and you can do this for each level. the first script is to change the level once you reach a certain score like 10 below, you can choose any number you want =. you can also add the first script to a level up sign and add a show block to show the sign after you reach a certain score and a wait for 3 seconds block then add a hide block, the rest of the scripting other than the first one should be put in the balloon especially the 2 last ones, you can repeat each step for each level except for the second script. hope i helped
when green flag clicked
set [ level] to [1]
wait until <[score] = [10]>
set [level ] to [2]
when green flag clicked
show variable [level ]
when I receive [balloon clicked level 1 ]
change [score ] by (1)
when I receive [balloon clicked level 2 ]
change [ score] by (2)
when this sprite clicked
if <[level] = [1]> then
broadcast [ balloon clicked level 1]
when this sprite clicked
if <[level] = [2]> then
broadcast [ balloon clicked level 2]
Last edited by thelion5000 (Nov. 12, 2020 10:30:56)
- ralpnathan
-
New Scratcher
1 post
how do u add levels to your game??
bro where do i insert that particular code?? in the backdrop or my main character??
- dem_bot
-
Scratcher
100+ posts
how do u add levels to your game??
bro where do i insert that particular code?? in the backdrop or my main character??Depends on what you are envisioning with your clicker. The when this sprite clicked threads need to be on the sprite you want to click and the rest depends on the way you'd organise it. However, I wouldn't do the broadcasts when the sprite is clicked and instead something like
when this sprite clicked
change [score v] by (level)
- Discussion Forums
- » Help with Scripts
-
» how do u add levels to your game??




