Discuss Scratch

fugimii
Scratcher
21 posts

Op Codes In The JSON File Of .sb3 Files

Lately I've Been Messing Around With The JSON Code In Scratch Projects And Im Wondering If There Is A List Of All Of The Opcodes Of Blocks.
ScolderCreations
Scratcher
1000+ posts

Op Codes In The JSON File Of .sb3 Files

Did you check the scratch wiki?
fugimii
Scratcher
21 posts

Op Codes In The JSON File Of .sb3 Files

Yes, I Couldn't Find Anything But Maybe I Just Didn't Look Hard Enough
PATSATDAT
Scratcher
1000+ posts

Op Codes In The JSON File Of .sb3 Files

there is a scratch wiki article here

Last edited by PATSATDAT (Sept. 15, 2021 09:52:12)

fugimii
Scratcher
21 posts

Op Codes In The JSON File Of .sb3 Files

No Im Wondering If There Is One For All Of The Op Codes
kccuber
Scratcher
1000+ posts

Op Codes In The JSON File Of .sb3 Files

fugimii wrote:

No Im Wondering If There Is One For All Of The Op Codes
That's it. If you want all of them (like for normal blocks like move steps) then You should put all of the blocks in a project, download it, and look through the JSON.
Maximouse
Scratcher
1000+ posts

Op Codes In The JSON File Of .sb3 Files

You can find them in the scratch-blocks source code here. For example, the opcode of the block defined as Blockly.Blocks['motion_movesteps'] is motion_movesteps.
Tadpole971
Scratcher
71 posts

Op Codes In The JSON File Of .sb3 Files

i feel like
when this sprite touches (mouse-pointer v) :: events hat
would be very useful
kccuber
Scratcher
1000+ posts

Op Codes In The JSON File Of .sb3 Files

Tadpole971 wrote:

i feel like
when this sprite touches (mouse-pointer v) :: events hat
would be very useful
its opcode is
event_whentouchingobject
Verixion
Scratcher
100+ posts

Op Codes In The JSON File Of .sb3 Files

colour
colour_picker
math
math_number
math_integer
math_whole_number
math_positive_number
math_angle
matrix
note
texts
text
control
control_forever
control_repeat
control_if
control_if_else
control_stop
control_wait
control_wait_until
control_repeat_until
control_while
control_for_each
control_start_as_clone
control_create_clone_of_menu
control_create_clone_of
control_delete_this_clone
control_get_counter
control_incr_counter
control_clear_counter
control_all_at_once
data
data_variable
data_setvariableto
data_changevariableby
data_showvariable
data_hidevariable
data_listcontents
data_listindexall
data_listindexrandom
data_addtolist
data_deleteoflist
data_deletealloflist
data_insertatlist
data_replaceitemoflist
data_itemoflist
data_itemnumoflist
data_lengthoflist
data_listcontainsitem
data_showlist
data_hidelist
defaultToolbox
event
event_whentouchingobject
event_touchingobjectmenu
event_whenflagclicked
event_whenthisspriteclicked
event_whenstageclicked
event_whenbroadcastreceived
event_whenbackdropswitchesto
event_whengreaterthan
event_broadcast_menu
event_broadcast
event_broadcastandwait
event_whenkeypressed
extensions
extension_pen_down
extension_music_drum
extension_wedo_motor
extension_wedo_hat
extension_wedo_boolean
extension_wedo_tilt_reporter
extension_wedo_tilt_menu
extension_music_reporter
extension_microbit_display
extension_music_play_note
looks
looks_sayforsecs
looks_say
looks_thinkforsecs
looks_think
looks_show
looks_hide
looks_hideallsprites
looks_changeeffectby
looks_seteffectto
looks_cleargraphiceffects
looks_changesizeby
looks_setsizeto
looks_size
looks_changestretchby
looks_setstretchto
looks_costume
looks_switchcostumeto
looks_nextcostume
looks_switchbackdropto
looks_backdrops
looks_gotofrontback
looks_goforwardbackwardlayers
looks_backdropnumbername
looks_costumenumbername
looks_switchbackdroptoandwait
looks_nextbackdrop
motion
motion_movesteps
motion_turnright
motion_turnleft
motion_pointindirection
motion_pointtowards_menu
motion_pointtowards
motion_goto_menu
motion_gotoxy
motion_goto
motion_glidesecstoxy
motion_glideto_menu
motion_glideto
motion_changexby
motion_setx
motion_changeyby
motion_sety
motion_ifonedgebounce
motion_setrotationstyle
motion_xposition
motion_yposition
motion_direction
motion_scroll_right
motion_scroll_up
motion_align_scene
motion_xscroll
motion_yscroll
operators
operator_add
operator_subtract
operator_multiply
operator_divide
operator_random
operator_lt
operator_equals
operator_gt
operator_and
operator_or
operator_not
operator_join
operator_letter_of
operator_length
operator_contains
operator_mod
operator_round
operator_mathop
procedures_definition
procedures_call
procedures_prototype
procedures_declaration
argument_reporter_boolean
argument_reporter_string_number
argument_editor_boolean
argument_editor_string_number
sensing
sensing_touchingobject
sensing_touchingobjectmenu
sensing_touchingcolor
sensing_coloristouchingcolor
sensing_distanceto
sensing_distancetomenu
sensing_askandwait
sensing_answer
sensing_keypressed
sensing_keyoptions
sensing_mousedown
sensing_mousex
sensing_mousey
sensing_setdragmode
sensing_loudness
sensing_loud
sensing_timer
sensing_resettimer
sensing_of_object_menu
sensing_of
sensing_current
sensing_dayssince2000
sensing_username
sensing_userid
sound
sound_sounds_menu
sound_play
sound_playuntildone
sound_stopallsounds
sound_seteffectto
sound_changeeffectby
sound_cleareffects
sound_changevolumeby
sound_setvolumeto
sound_volume
CST1229
Scratcher
1000+ posts

Op Codes In The JSON File Of .sb3 Files

Verixion wrote:

extensions
extension_pen_down
extension_music_drum
extension_wedo_motor
extension_wedo_hat
extension_wedo_boolean
extension_wedo_tilt_reporter
extension_wedo_tilt_menu
extension_music_reporter
extension_microbit_display
extension_music_play_note
Translate isn't there, or basically anything else from any other extension.
I think this was taken from the playground source code, which only includes those blocks in the extensions.

Last edited by CST1229 (Sept. 26, 2021 10:28:51)

Maximouse
Scratcher
1000+ posts

Op Codes In The JSON File Of .sb3 Files

Verixion wrote:

extensions
extension_pen_down
extension_music_drum
extension_wedo_motor
extension_wedo_hat
extension_wedo_boolean
extension_wedo_tilt_reporter
extension_wedo_tilt_menu
extension_music_reporter
extension_microbit_display
extension_music_play_note
These are incorrect.
Neon_Sprite
Scratcher
1 post

Op Codes In The JSON File Of .sb3 Files

Hello everyone! I have created an amazing tool under the name of Teddy Bear…. Click on the link.
Vista8p1
Scratcher
8 posts

Op Codes In The JSON File Of .sb3 Files

Verixion wrote:

defaultToolbox
what is this
fortyonetest
Scratcher
29 posts

Op Codes In The JSON File Of .sb3 Files

Vista8p1 wrote:

Verixion wrote:

defaultToolbox
what is this

pretty sure this isn't a block, because i tried it out and its undefined

Powered by DjangoBB