Discuss Scratch
- Discussion Forums
- » Suggestions
- » The ability to put event blocks in define scripts
- Yanderan
-
Scratcher
100+ posts
The ability to put event blocks in define scripts
I think this would be very useful 

- JavierR100
-
Scratcher
500+ posts
The ability to put event blocks in define scripts
Can you explain?
Do you mean like this:
Do you mean like this:
define when gf clicked :: hator this?
define . . . :: grey
. . .
if <when gf clicked> then{
when gf clicked} :: control
when gf clicked :: stack
set (when gf clicked) to (when gf clicked)
- JavierR100
-
Scratcher
500+ posts
The ability to put event blocks in define scripts
whoops, i mean like this?
define . . .
[insert events blocks here] :: events stack
- Yanderan
-
Scratcher
100+ posts
The ability to put event blocks in define scripts
Can you explain?Yeah. A bit like #2
Do you mean like this:define when gf clicked :: hator this?define . . . :: grey
. . .
if <when gf clicked> then{
when gf clicked} :: control
when gf clicked :: stack
set (when gf clicked) to (when gf clicked)

- GlassGalaxy
-
Scratcher
500+ posts
The ability to put event blocks in define scripts
Like this…?
But wouldn't I just be able to do this?
define ...
when green flag clicked ::stack
whatever ::grey stack
more stuff ::grey stack
But wouldn't I just be able to do this?
define ...
whatever ::grey stack
more stuff ::grey stack
when green flag clicked
... ::custom
- Jonathan50
-
Scratcher
1000+ posts
The ability to put event blocks in define scripts
You can already put events blocks in custom blocks:
If you mean putting hat blocks in custom blocks, what will that do?
define foo
broadcast [... v] and wait
If you mean putting hat blocks in custom blocks, what will that do?
- Sheep_maker
-
Scratcher
1000+ posts
The ability to put event blocks in define scripts
What would the event block do? Would it trigger the custom block when the event happens, like this:
when gf clicked
foo
define foo
- TNGC_TEST
-
Scratcher
33 posts
The ability to put event blocks in define scripts
you don't need it because the defined block can be attached to an event block
- Ziggy741
-
Scratcher
1000+ posts
The ability to put event blocks in define scripts
What would it be used for? 

- Yanderan
-
Scratcher
100+ posts
The ability to put event blocks in define scripts
So you could put the hat block right underneath the define block. I can't show you an exact image, but you can try to show me one 

- Ziggy741
-
Scratcher
1000+ posts
The ability to put event blocks in define scripts
So you could put the hat block right underneath the define block. I can't show you an exact image, but you can try to show me oneWhat would it do?

- Yanderan
-
Scratcher
100+ posts
The ability to put event blocks in define scripts
So for example, if you made a custom block called “hjfuvrhgutghtu” with aSo you could put the hat block right underneath the define block. I can't show you an exact image, but you can try to show me oneWhat would it do?
when gf clickedon top of the define script (under the define block itself), then you just be able to place the block alone and when you click the green flag, it would run!
- alexphan
-
Scratcher
1000+ posts
The ability to put event blocks in define scripts
So basicallySo for example, if you made a custom block called “hjfuvrhgutghtu” with aSo you could put the hat block right underneath the define block. I can't show you an exact image, but you can try to show me oneWhat would it do?when gf clickedon top of the define script (under the define block itself), then you just be able to place the block alone and when you click the green flag, it would run!
when green flag clicked
hjfuvrhgutghtu :: custom
define hjfuvrhgutghtu
do stuff :: grey
- Ziggy741
-
Scratcher
1000+ posts
The ability to put event blocks in define scripts
So the thing would just run the green flag?So basicallySo for example, if you made a custom block called “hjfuvrhgutghtu” with aSo you could put the hat block right underneath the define block. I can't show you an exact image, but you can try to show me oneWhat would it do?when gf clickedon top of the define script (under the define block itself), then you just be able to place the block alone and when you click the green flag, it would run!when green flag clicked
hjfuvrhgutghtu :: custom
define hjfuvrhgutghtu
do stuff :: grey
- Yanderan
-
Scratcher
100+ posts
The ability to put event blocks in define scripts
Sort of.So the thing would just run the green flag?So basicallySo for example, if you made a custom block called “hjfuvrhgutghtu” with aSo you could put the hat block right underneath the define block. I can't show you an exact image, but you can try to show me oneWhat would it do?when gf clickedon top of the define script (under the define block itself), then you just be able to place the block alone and when you click the green flag, it would run!when green flag clicked
hjfuvrhgutghtu :: custom
define hjfuvrhgutghtu
do stuff :: grey
- Ziggy741
-
Scratcher
1000+ posts
The ability to put event blocks in define scripts
Okay.Sort of.So the thing would just run the green flag?So basicallySo for example, if you made a custom block called “hjfuvrhgutghtu” with aSo you could put the hat block right underneath the define block. I can't show you an exact image, but you can try to show me oneWhat would it do?when gf clickedon top of the define script (under the define block itself), then you just be able to place the block alone and when you click the green flag, it would run!when green flag clicked
hjfuvrhgutghtu :: custom
define hjfuvrhgutghtu
do stuff :: grey
- Sigton
-
Scratcher
1000+ posts
The ability to put event blocks in define scripts
Sort of.What do you mean by “sort of”?
Sigton
- iiHoopsL
-
Scratcher
30 posts
The ability to put event blocks in define scripts
I was looking through this thread because i need to find out if there is a way to do this for a project:
and then make a seperate script looking like:
Can anyone help me out?
define Received NextRound
ask [this is supposed to be an event] and wait
ask [then i need to put a script here] and wait
and then make a seperate script looking like:
when I receive [NextRound v]
forever
if <Received NextRound> then
Stuffs
end
end
Can anyone help me out?
Last edited by iiHoopsL (March 27, 2021 23:45:10)
- IDontNoWatIAm
-
Scratcher
500+ posts
The ability to put event blocks in define scripts
I was looking through this thread because i need to find out if there is a way to do this for a project:Why not ask in Help With Scripts?define Received NextRound
ask [this is supposed to be an event] and wait
ask [then i need to put a script here] and wait
and then make a seperate script looking like:when I receive [NextRound v]
forever
if <Received NextRound> then
Stuffs
end
end
Can anyone help me out?
- Discussion Forums
- » Suggestions
-
» The ability to put event blocks in define scripts










