@@ominousplayer I regularly use it myself but its only effective using integers, say we have 5.01 and its going to detect if its 6 or higher it would return false while if we put higher than 5 it would return correct. While its obviously possible to just put higher than 5.999 to counter this most people just use 5 and higher to make it less messier
Here's a better way: wait until ( not ( (mouse down) or (touching mouse) ) ) the reason we use not (x or y) is because it only activates if x and y is false
Something i learned is that when you want to upgrade a item like if your making a rpg and they get a better sword in which does 10 instead of 5 dmg you should give it 0.01 seconds before showing when you look at your items or something because i ran into a couple of bugs where it goes too fast, doesnt register and just stresses me out about it bugging with other items or something
@@Anqi-ew1lc 0 seconds also does something Im not what this comment is meaning i think he was just talking about a weird edge case that happens in his game but just so you know wait 0 seconds actualy waits a single Frame İm not sure if this helps anything but good to know i guess I always use it when something happens before something that it shouldnt
Instead of doing the "forever - if mouse down and touching mouse pointer" all you need to do is grab the when sprite clicked block from the Events category.
Here is the code: if > then change [score v] by ((0) - (bread price)) change [bread price v] by (25) change [bread v] by (1) Try fixing your shop with this!😊
Just use; When this sprite clicked İf money > 49 Change bread by 1 Change money by -50 When flag clicked Set bread to 0 Set money to 100 Its alot more smaller and it also fixes the issue of acsedently buying way too much breads becouse you holded
@@wuiuoluminum2 also, if your using clones for buttons, use "for all sprites" instead of "for this sprite only" because if you use a local variable/list (for this sprite only) clones will have different value to the main sprite and different clones, tho if your using stamps (which most people dont do) use a local variable/list
Ok that easy i knew that always When this spire clicked If money is more than (>) 50/49 Then Broadcast: bread give (or you can have a variable which you use) Change money by -50 Boom done. This is for mobile not computer btw
{when green flag is clicked} {when sprite clicked} {set [money] to (100)} {if then} {set [bread] to (0)} {change [money] by (-50)} e {change [bread] by (1)}
Why not just; When sprite clicked İf money bigger then 49 Change bread by 1 Change money by -50 Its alot faster and you wont waste all your money when you hold *You had one job and failed miserebly*
What if you can have decimal numbers for money (ex: 49.5), then you would get bread despite having 0.5 less money than needed. I think rounding the money down would fix the problem (if there is a way to round down in scratch)
tip: instead of doing "(variable = 50) or (variable > 50)" try doing "(variable > 49)" cause it's shorter and detects if it is 50 or higher!
fr why don’t people do that, it’s so much faster
@@ominousplayer I regularly use it myself but its only effective using integers, say we have 5.01 and its going to detect if its 6 or higher it would return false while if we put higher than 5 it would return correct. While its obviously possible to just put higher than 5.999 to counter this most people just use 5 and higher to make it less messier
@@samuraigaming0 ok here is a much worse way to do it "reset timer, wait until timer = 5.99, if var > timer then"
There is no >=50 ?
@@Rhidayah there is (value) > (value)
1 bread for 50$: Zimbabwe vibes
Lol
I’ll make Zimbabwe 1 bread for 600 million
villager vibes
Tip: Add [wait {0.3} seconds] to prevent you from accidentally buying a lot.
Here's a better way:
wait until (
not (
(mouse down) or
(touching mouse)
)
)
the reason we use not (x or y) is because it only activates if x and y is false
Ty for the suggestion
Realistic :
Fowever (set money =0)
Instead of the big > 50 or = 50, just use > 49
ty
Very nice
Tip : Add ( wait until < not < mouse down? > > ) to ensure you don't click it once and lose ALL of your money accidentally.
Or you know... Use when sprite clicked
@@Muho_is_me NO I HATE THAT BLOCK
@@Anqi-ew1lc whi?
Bro! you are the best!
Something i learned is that when you want to upgrade a item like if your making a rpg and they get a better sword in which does 10 instead of 5 dmg you should give it 0.01 seconds before showing when you look at your items or something because i ran into a couple of bugs where it goes too fast, doesnt register and just stresses me out about it bugging with other items or something
Tip for your tip : NEVER USE WAIT 0.01 or 0.001, this does the same thing as wait 0 so it saves like 0.1 seconds so thats cool? :)
@@Anqi-ew1lc 0 seconds also does something
Im not what this comment is meaning i think he was just talking about a weird edge case that happens in his game but just so you know wait 0 seconds actualy waits a single Frame
İm not sure if this helps anything but good to know i guess
I always use it when something happens before something that it shouldnt
Thank You :D
“How did you become poor?”
*”i clicked a flag”
Conclusion: don’t click flags
Thanks!!:)
You: My item cost 50$ Me: FOR FRICKING BREAD??!
14:01 his stomach looks like sonic-
this type of stuff is easy ngl
It’s for new comers. And everyone sees things in more or less difficulty than others
Thanks dude!
TYSM! I needed this, don’t get why it’s money > 50 when it should be money > 49 but really helpful, instant like
Yeah it was a dumb mistake. But im happy if this video helped you🥰
@@ScratchTuto it defintley did, I might subscribe just for this one vid!
@@ScratchTutoanother dumb mistake was not using the when sprite clicked so that your money wouldnt die when you hold
for more idea:put a sound of buying like TING
or what u want
it is amazinggggggggggggggggggg
It was simple and awesome!
THX
@@ScratchTutocan you do a tutorial on how to use text instead of that base vanilla variable. Like. An art of money instead of just “show variable”
@@ScratchTutohard to explain but basically like using text to have the value and show a sprite text for the value so it looks better
@@whatisthis6259yeah i know what you mean and thats a good idea and i would make a tutorial on it but i dont make videos anymore
@@ScratchTuto I understand, I’ll look somewhere else
using lists and clones would make this thing easier
Yeps u studied for scratch
you don't need that many blocks, you can easily simplify it
Cool
Just use when sprite is clicked instead of mouse pointer and mouse down it’s way cleaner
Yeah im surprised no one is saying them
Tip: instead of the or block you should just do variable1>variable2-1.
Nicee
Instead of doing the "forever - if mouse down and touching mouse pointer" all you need to do is grab the when sprite clicked block from the Events category.
thanks now i can program this in scratch
Nice and good fir beginners! But you could have just done money > 49 instead of money = 50 or money > 50 still good tutorial tho keep it up!
Here is the code:
if > then
change [score v] by ((0) - (bread price))
change [bread price v] by (25)
change [bread v] by (1)
Try fixing your shop with this!😊
only works with integers
Edit: i fixed the typo
Scratch: *has a block for “isClicked”*
Him: If (mouseOver? && mouseDown?)
Thanks for this even tho I know how to make one it’s just an easier way to make it❤️
Just use;
When this sprite clicked
İf money > 49
Change bread by 1
Change money by -50
When flag clicked
Set bread to 0
Set money to 100
Its alot more smaller and it also fixes the issue of acsedently buying way too much breads becouse you holded
love you
i saw a safari now is working yaaaaaaaay🎉
Please make horizontal
You can change the wait .1 sec to wait until not mouse down and place that wait block on top of the cange bread by 1 and change money by -50
You could also do when this sprite clicked, if money is greater than 49 then.
I can’t see the screen it’s way to blurry
When i watch it in my pc its fine but im also trying to make the quality better in future so sorry for that
@ScratchTuto when i watch a short ,the whole half of short goes up
1 bread is 50$? Thats expensive ngl
Yeah big inflation
@@ScratchTuto pov : covid
its An Apple IBread
@@Breadclips0 pov : apple made bread
@@ZaeNonQ bro, stop acting like you get 5$ a month, thats literally the cheapest bread ive seen
I subscribe
thx
I found a easier way to do it but i have to video link it
How can we interact with the item after buying it?
0:00
It's easier in penguinmod because of new blocks
0:01
if you're using more than a item, use lists instead of variables for the price
Hey, that's a pretty good idea!
@@wuiuoluminum2 also, if your using clones for buttons, use "for all sprites" instead of "for this sprite only" because if you use a local variable/list (for this sprite only) clones will have different value to the main sprite and different clones, tho if your using stamps (which most people dont do) use a local variable/list
1:15
Thats one expensive bread 🤣
Zimbabwe moment
@@ScratchTuto lol
Ok
How to do mobile controls
Bread 👍
Ok that easy i knew that always
When this spire clicked
If money is more than (>) 50/49
Then
Broadcast: bread give (or you can have a variable which you use)
Change money by -50
Boom done.
This is for mobile not computer btw
When this sprite clicked
If Money = 50 or Money > 50
Change Money by -50
Change bread by 1
On mobile??
yo i tried this it worked but when i bought item 2nd time it didnt work it when i collected money it automatiacally buyed
All i all i all i all i wanted was a bit o bred
(Start)
I want to make a off brand Fortnite game whats the best way i can run a item-shop
Theres an eisier way
i dont undersatnd how to get the vairable to turn into to a block
For phone????
Inflation be like:
it works! i spent hour trying to figure it out my self
YOU SPENT A HOUR ON THIS, YOU ARE SO BASIC THAT YOU CANT EVENT FOLLOW SCRATCH'S TEAM TUTORIALS
{when green flag is clicked} {when sprite clicked}
{set [money] to (100)} {if then}
{set [bread] to (0)} {change [money] by (-50)}
e {change [bread] by (1)}
I ruined the 666 likes
The bread variable is just useless 💀
why is it in a forever loop? Isn't it better and easier to just put "when this sprite clicked" ?
It is trying to make it so that "whenflag clicked" not "when this Sprite clicked" 😅
You dont need to put = and > just make ,money > 50 - 1,
I wan’t to make online shop
It didn’t work on ipad
siuu
why not to use money>49 boolean instead? it's easier
Money going to negetive 😢
There's no mouse pointer block
Why not just;
When sprite clicked
İf money bigger then 49
Change bread by 1
Change money by -50
Its alot faster and you wont waste all your money when you hold
*You had one job and failed miserebly*
Oh and have a when flag clicked to reset the varilables
🗿
more code for you Forever if money= -1 or Money
100%
just use money > 49
money
IT DIDNT WORK
YOU DIDNT SHOW THE FULL SCREEN
Dosn't work the money is showing up and when i click nothing happens 😡
...
Good tip: money>49
What if you can have decimal numbers for money (ex: 49.5), then you would get bread despite having 0.5 less money than needed.
I think rounding the money down would fix the problem (if there is a way to round down in scratch)
@@louisyama9145 money>49.9😳
You can just put ( if money > 49 )
Change ( bread ) by 1
Change ( money ) by -50
Easy!
Do real programming
you take too short
Bro tf who needs it i have a game in scratch retail tycoon 2 the owner is bolkata and its me just try it
?? maybe someone that is learning scratch
@@ScratchTuto ok but can you check my game on scratch its Retail Tycoon 2. The owner name is bolkata and its me pls
@@ScratchTuto example:me
meh
F10 doesn’t work guys don’t use this goof
Wtf nobody needs this
Shut up! He is way better than you!
Very nice
0:00
I want to make a off brand Fortnite game whats the best way i can run a item-shop