Discuss Scratch
- Discussion Forums
- » Suggestions
- » Ultimate List of Workarounds And More
- noogai34
- Scratcher
46 posts
Ultimate List of Workarounds And More
For those who want a workaround for
<[Broadcast v]?>use
when gf clickedand
set [YeetRecieved? v] to [0]
broadcast [yeet v]
when I receive [yeet v]
set [YeetRecieved? v] to [1]
<(YeetRecieved?) = (1)>is your
<[Broadcast v]?>
Last edited by noogai34 (April 28, 2019 15:15:52)
S U C C
- ronsid
- Scratcher
100+ posts
Ultimate List of Workarounds And More
for the
set pen color to hex input []::penyou can use
define set pen color to hex input [hex]
set pen color to (join [0x] (hex))
This siggy is protected by the Antiquat group
when green flag clicked
say [Scratch Time] for (2) secs
broadcast [funtime v]
when I receive [funtime v]
say [ Yaay] for (2) secs
- --Explosion--
- Scratcher
1000+ posts
Ultimate List of Workarounds And More
This is totally wrong…I think that…whoops, fixed it!Wait why does the custom block have two ‘true’?I put it into a custom block: You should fix the Leap Year workarounddefine (year) is a leap year?
set [leap year v] to [false]
if <((year) mod (4)) = [0]> then
if <((year) mod (100)) = [0]> then
if <((year) mod (400)) = [0]> then
set [leap year v] to [true]
else
set [leap year v] to [false]
end
else
set [leap year v] to [true]
end
else
stop [this script v]
end
…or as a boolean:<<((year) mod (4)) = [0]> or <<((year) mod (100)) = [0]> and <((year) mod (400)) = [0]>>>
Leap years are every 4 years canr you jist do year mod 4
I'm just dumb like thatdefine (year) is a leap year?would be better.
if <((year) mod (4)) = [0]> then
if <((year) mod (100)) = [0]> then
if <((year) mod (400)) = [0]> then
set [leap year v] to [true]
else
set [leap year v] to [false]
end
else
set [leap year v] to [true]
end
else
set [leap year v] to [false]
end
stop [this script v]
For Boolean, I think that the correct version is<<((year) mod (4)) = [0]> and <<not <((year) mod (100)) = [0]>> or <((year) mod (400)) = [0]>>>but maybe someone else could check it?
Leap Years are every 4 years, and so they work by mod 400, but for that to work you also need to mod 4 and 100.
You overcomplicate the custom block which was best as alexphan had it, and the reporter is wrong…
- BD10355
- Scratcher
14 posts
Ultimate List of Workarounds And More
Could you make a workaround that senses if the sprite touches a specific side of the screen? Thx. It might look like this.
if on top edge, bounce
Signed,
BD10355
pen up
- Shaymin524
- Scratcher
68 posts
Ultimate List of Workarounds And More
Use Could you make a workaround that senses if the sprite touches a specific side of the screen? Thx. It might look like this.if on top edge, bounce
if <(y position) > [180]> then
if on edge, bounce
end
change y position and 180 for whichever side you need.
—————————————————————————
GENERATION 1: When you first see this copy it to the start of your sig and change Generation by 1.
—————
Bring back remix trees, scroll blocks, picoboards and the discuss tab!
—————
Trans girl / Lesbian / 13 / Libra
- BD10355
- Scratcher
14 posts
Ultimate List of Workarounds And More
Use Could you make a workaround that senses if the sprite touches a specific side of the screen? Thx. It might look like this.if on top edge, bounceif <(y position) > [180]> then
if on edge, bounce
end
change y position and 180 for whichever side you need.
Thank you!
say [You r de best Shaymin524!]
Signed,
BD10355
pen up
- Einstein102
- Scratcher
1 post
Ultimate List of Workarounds And More
Ya I was working on a talking informational solar system model and I wanted to implement a little clicker game and once you got a certain amount of coins you could get new information about a planet. I also wanted the planets to move revolve around the sun and I wanted them to do it forever without a forever block so I used message blocks and it didnt work.
- Shaymin524
- Scratcher
68 posts
Ultimate List of Workarounds And More
ywUse Could you make a workaround that senses if the sprite touches a specific side of the screen? Thx. It might look like this.if on top edge, bounceif <(y position) > [180]> then
if on edge, bounce
end
change y position and 180 for whichever side you need.
Thank you!say [You r de best Shaymin524!]
—————————————————————————
GENERATION 1: When you first see this copy it to the start of your sig and change Generation by 1.
—————
Bring back remix trees, scroll blocks, picoboards and the discuss tab!
—————
Trans girl / Lesbian / 13 / Libra
- MathlyCat
- Scratcher
1000+ posts
Ultimate List of Workarounds And More
Think before you act.
Actions speek louder than words.
hi there fella
Actions speek louder than words.
hi there fella
- Discussion Forums
- » Suggestions
- » Ultimate List of Workarounds And More