how can i getg this input from this block

untitled script pic (5)
untitled script pic (4)

I don't understand the question, could you elaborate? If you want to get output from a custom block, you need to make the round "reporter" type, and then put it into your script.

In the picture, your SET SPEED TO block doesn't do anything! For example, if you made a global variable called SPEED you could then do this:
preloaded libraries script pic  preloaded libraries script pic (1)
There are other things you could do besides put it in a variable, but you have to put it somewhere in your SET SPEED block, because the input variable, the one you called SPEED and I called NEW SPEED (to make it different from the global variable name), is temporary; it's only available while that block is running.

yes but why cant u do ask [set speed to (speed)] for speed

"Set speed to (...)" is a command block, not a reporter block. It doesn't report a value, so it can't be used as input to another block.

Also, the ASK block requires a sprite as its first input, not a number.

That's not what the "ask" block is used for.

but y cand u do this untitled script pic (7)

Dizzy code

???whAt u mean

but you could at least get the speed from the block

These blocks:

tell [ v] to ({...} :: grey ring) :: control
(ask [ v] for ((... :: grey) :: grey ring) :: control

are for running blocks and scripts in another sprite.
Make a variable for speed. If you really don't want to make a Snap! variable for speed, do this:

JS f

{set speed to ((new speed # = 1) :: motion) :: motion} :: control hat
run (JavaScript function \( [newSpeed] \) \{ [this.speed = newSpeed;] \} :: operators) with inputs (new speed) :: control
(speed :: motion) :: control hat
report (call (JavaScript function \( \) \{ [return +this.speed;] \} :: operators) :: control) :: control cap

1 Like

thanks it works now i can make billy blox motion script pic (2) blocks