Discuss Scratch

R4356th
Scratcher
1000+ posts

Workarounds for Blocks Scratch Does Not Have

Looks:
previous costume
switch costume to [((costume #) - (1)) v]
previous backdrop

switch costume to [((backdrop #) - (1)) v]
hide all sprites

hide
broadcast [hide v]

when I receive [hide v]
hide
———————————————————–
Motion:
bounce
point in direction ( ( direction ) - ( 180 ) )

point towards x:(x)y:(y)

point in direction (((180) * <<(y position) > (y)> or <(y postion) = (y)>>) + ([atan v] of (((x position) - (x)) / ((y position) - (y)))))
point in direction (((180) * <<(y position) > (y)> or <(y postion) = (y)>>) + ([atan v] of (((x position) - (x)) / ((y position) - (y)))))
(Thanks to @Monna-Uka for this block.)
glide () seconds to (x) x (y) y

set (speed x v) to ((x) - (x position)) / ((seconds) * (30))
set (speed y v) to ((y) - (y position)) / ((seconds) * (30))
repeat ((seconds) * (30))
change x by (speed x)
change y by (speed y)
end
———————————————————–
Events:
when ( :: obsolete) clicked :: hat
when @greenFlag clicked
forever
set [timer v] to ( timer )
end

when [timer v] > ( timer :: variables )
———————————————————–
Control:
while < > {

} @loopArrow
repeat until < not < something is equal to something or i.e. true > >

end


forever if <>

end

forever
if <> then

end
end
———————————————————–
Sensing:
< key [some key v] pressed? >
< key ( join [enter] [] ) pressed? >
< key ( join [;] [] ) pressed? >
< key ( join ['] [] ) pressed? >
< key ( join [/] [] ) pressed? >
< key ( join [,] [] ) pressed? >
———————————————————–
Extensions:
Pen:
draw square length and width () steps
define draw square length and width () steps
pen down
repeat (4)
move (length) steps
turn cw (90) degrees
end
draw triangle size ()

pen down
repeat (3)
move (size) steps
turn cw ((360) / (3)) degrees
end
pen up
draw polygon sides () size ()

pen down
repeat (sides)
move (size) steps
turn cw ((360) / (sides)) degrees
end
pen up

Last edited by R4356th (April 26, 2020 11:06:13)

Monna-Uka
Scratcher
1000+ posts

Workarounds for Blocks Scratch Does Not Have

Cool! You should include the
point towards x: () y: ()
too!

R4356th
Scratcher
1000+ posts

Workarounds for Blocks Scratch Does Not Have

Monna-Uka wrote:

Cool! You should include the
point towards x: () y: ()
too!
Workaround, please?
Monna-Uka
Scratcher
1000+ posts

Workarounds for Blocks Scratch Does Not Have

define point towards x: (x) y: (y)
//RO tutorials's method
point in direction (((180) * <<(y position) > (y)> or <(y postion) = (y)>>) + ([atan v] of (((x position) - (x)) / ((y position) - (y)))))
point in direction (((180) * <<(y position) > (y)> or <(y postion) = (y)>>) + ([atan v] of (((x position) - (x)) / ((y position) - (y)))))
define point towards x: (a) y: (b)
//My little update, reduces 1 boolean
point in direction (((180) * <not <(y position) < (b)>>) + ([atan v] of (((x position) - (a)) / ((y position) - (b)))))
point in direction (((180) * <not <(y position) < (b)>>) + ([atan v] of (((x position) - (a)) / ((y position) - (b)))))
Here's the workarounds.

Last edited by Monna-Uka (April 21, 2020 13:54:56)


R4356th
Scratcher
1000+ posts

Workarounds for Blocks Scratch Does Not Have

Monna-Uka
Scratcher
1000+ posts

Workarounds for Blocks Scratch Does Not Have

R4356th wrote:

Are you sure it works? I tested it and it did nothing.
That's from RO tutorials, so I can't sure it's workable for 100%.

R4356th
Scratcher
1000+ posts

Workarounds for Blocks Scratch Does Not Have

Monna-Uka wrote:

R4356th wrote:

Are you sure it works? I tested it and it did nothing.
That's from RO tutorials, so I can't sure it's workable for 100%.
I cannot add it then.
PizzaAddict4Life
Scratcher
1000+ posts

Workarounds for Blocks Scratch Does Not Have

Is there a work around for

repeat until <I receive message 1>

end
?

I would think maybe

when [ v] key pressed
set [Message 1 v] to [1]

when green flag clicked
repeat until <[(Message 1)] = [1]>

end
set [Message 1 v] to [0]

Last edited by PizzaAddict4Life (April 21, 2020 15:07:56)


Projects
#SaveCubeupload | Kumquat Attack | Game in which you can submit your avatar

Studios
Be Moist | Forum Helpers

Topics
#RoadToMoist100

Press CTRL+SHIFT+DOWN after highlighting a bit of my signature to see the rest of my signature (and keep doing it)

Whats a stick?

If you suggest that the days since 2000 block is removed, you are going to feel the wrath of my TNT recklessness

My kumquat protectors: (~˘▾˘)~ ( ಠ ͜ʖರೃ) ( ಠ ͜ʖರೃ) ( ಠ ͜ʖರೃ) (◕‿◕✿) ( ಠ ͜ʖರೃ) ( ಠ ͜ʖರೃ) ༼ つ ◕_◕ ༽つ
Total Power: 35





Ok this is the end of my signature, but scroll down some more if you want some nice color hex codes.



Turquoise ish green: #17e67b
Epic nice blue: #0090c0
Cool light blue: #c4ffec, #a3ffe1, #85ffd7








































































































Bippity Boppity Boo wow you found me congrats
Maximouse
Scratcher
1000+ posts

Workarounds for Blocks Scratch Does Not Have

PizzaAddict4Life wrote:

Is there a work around for

repeat until <I receive message 1>

end
?
I think this should work:
when I receive [message 1 v]
set [message 1 received? v] to (1)

when flag clicked
set [message 1 received? v] to (0)
repeat until <(message 1 received?) = (1)>
...


This is Maximouse's signature. Learn more about signatures.
PizzaAddict4Life
Scratcher
1000+ posts

Workarounds for Blocks Scratch Does Not Have

Maximouse wrote:

PizzaAddict4Life wrote:

Is there a work around for

repeat until <I receive message 1>

end
?
I think this should work:
when I receive [message 1 v]
set [message 1 received? v] to (1)

when flag clicked
set [message 1 received? v] to (0)
repeat until <(message 1 received?) = (1)>
...
That works too

Projects
#SaveCubeupload | Kumquat Attack | Game in which you can submit your avatar

Studios
Be Moist | Forum Helpers

Topics
#RoadToMoist100

Press CTRL+SHIFT+DOWN after highlighting a bit of my signature to see the rest of my signature (and keep doing it)

Whats a stick?

If you suggest that the days since 2000 block is removed, you are going to feel the wrath of my TNT recklessness

My kumquat protectors: (~˘▾˘)~ ( ಠ ͜ʖರೃ) ( ಠ ͜ʖರೃ) ( ಠ ͜ʖರೃ) (◕‿◕✿) ( ಠ ͜ʖರೃ) ( ಠ ͜ʖರೃ) ༼ つ ◕_◕ ༽つ
Total Power: 35





Ok this is the end of my signature, but scroll down some more if you want some nice color hex codes.



Turquoise ish green: #17e67b
Epic nice blue: #0090c0
Cool light blue: #c4ffec, #a3ffe1, #85ffd7








































































































Bippity Boppity Boo wow you found me congrats
Maximouse
Scratcher
1000+ posts

Workarounds for Blocks Scratch Does Not Have

I would probably write the blocks in the OP like this (quote to see code):

R4356th wrote:

Looks:

previous costume :: looks

switch costume to ((costume [number v] :: looks) - (1))

previous backdrop :: looks

switch costume to ((backdrop #) - (1))

hide all sprites :: looks

hide
broadcast [hide v]

when I receive [hide v]
hide

———————————————————–
Motion:

bounce :: motion

point in direction ( ( direction ) - ( 180 ) )

———————————————————–
Events:

when ( :: obsolete) clicked :: events hat

when @greenFlag clicked
forever
set [timer v] to ( timer )
end

when [timer v] > ( timer :: variables )

———————————————————–
Control:

while <condition :: grey> {

} @loopArrow :: control

repeat until < not <condition :: grey> >

end

———————————————————–
Sensing:

< key [some key v] pressed? >

< key ( join [enter] [] ) pressed? >
< key ( join [;] [] ) pressed? >
< key ( join ['] [] ) pressed? >
< key ( join [/] [] ) pressed? >
< key ( join [,] [] ) pressed? >

———————————————————–
Extensions:

Pen:

draw square length and width () steps :: pen

define draw square length and width (length) steps
pen down
repeat (4)
move (length) steps
turn cw (90) degrees
end

draw triangle size () :: pen

pen down
repeat (3)
move (size) steps
turn cw ((360) / (3)) degrees
end
pen up

draw polygon sides () size () :: pen

pen down
repeat (sides)
move (size) steps
turn cw ((360) / (sides)) degrees
end
pen up


This is Maximouse's signature. Learn more about signatures.
Monna-Uka
Scratcher
1000+ posts

Workarounds for Blocks Scratch Does Not Have

Monna-Uka wrote:

define point towards x: (x) y: (y)
//RO tutorials's method
point in direction (((180) * <<(y position) > (y)> or <(y postion) = (y)>>) + ([atan v] of (((x position) - (x)) / ((y position) - (y)))))
point in direction (((180) * <<(y position) > (y)> or <(y postion) = (y)>>) + ([atan v] of (((x position) - (x)) / ((y position) - (y)))))
define point towards x: (a) y: (b)
//My little update, reduces 1 boolean
point in direction (((180) * <not <(y position) < (b)>>) + ([atan v] of (((x position) - (a)) / ((y position) - (b)))))
point in direction (((180) * <not <(y position) < (b)>>) + ([atan v] of (((x position) - (a)) / ((y position) - (b)))))
Here's the workarounds.
So… Thanks to the web that our dear Scratch Team banned (ST please don't ban me, I had came there before joined Scratch), I got a link to the project that uses RO's custom block. I checked the blocks, there's no difference. So that works okay, I guess?

R4356th
Scratcher
1000+ posts

Workarounds for Blocks Scratch Does Not Have

@PizzaAddict4Life and @Maximouse, I will check both of your code as soon as I get access to a computer. @Maximouse, the reason I wrote the post without using your code was that I wanted to make it easy to read. @MonnaUKA, that project is taking too long to load, so I will check that after getting access to a computer.
Monna-Uka
Scratcher
1000+ posts

Workarounds for Blocks Scratch Does Not Have

R4356th wrote:

That project is taking too long to load, so I will check that after getting access to a computer.
It's not even that big…

Monna-Uka
Scratcher
1000+ posts

Workarounds for Blocks Scratch Does Not Have

Also, this may be a duplicate of this Scratch Wiki article. You may want to close the topic, or just copy all those workarounds here, but it'll be super long. :c
(That also has the point towards x-y block, but the first boolean is replaced with <(y) > (y position)>).

R4356th
Scratcher
1000+ posts

Workarounds for Blocks Scratch Does Not Have

Monna-Uka wrote:

Also, this may be a duplicate of this Scratch Wiki article. You may want to close the topic, or just copy all those workarounds here, but it'll be super long. :c
(That also has the point towards x-y block, but the first boolean is replaced with <(y) > (y position)>).
That covers the blocks Scratch already has.
R4356th
Scratcher
1000+ posts

Workarounds for Blocks Scratch Does Not Have

Monna-Uka wrote:

I got a link to the project that uses RO's custom block. I checked the blocks, there's no difference. So that works okay, I guess?
Uh, that worked! I am adding it with credit.

Last edited by R4356th (April 22, 2020 10:21:25)

Monna-Uka
Scratcher
1000+ posts

Workarounds for Blocks Scratch Does Not Have

R4356th wrote:

Monna-Uka wrote:

I got a link to the project that uses RO's custom block. I checked the blocks, there's no difference. So that works okay, I guess?
Uh, that worked! I am adding it with credit.
Okay!

Monna-Uka
Scratcher
1000+ posts

Workarounds for Blocks Scratch Does Not Have

R4356th wrote:

Monna-Uka wrote:

Also, this may be a duplicate of this Scratch Wiki article. You may want to close the topic, or just copy all those workarounds here, but it'll be super long. :c
(That also has the point towards x-y block, but the first boolean is replaced with <(y) > (y position)>).
That covers the blocks Scratch already has.
At least it still has a section of non-exist Scratch blocks.

deck26
Scratcher
1000+ posts

Workarounds for Blocks Scratch Does Not Have

I think this belongs in Show and Tell rather than here. I think anything in here other than people posting questions actually just confuses things.

Powered by DjangoBB