Pikachanian wrote:
Scratchie wrote:
How about an <I receive> sensing block?
Great idea. I'm trying to make a game similar to lemmings and that would make a lot easier.
Just so you know, You can replace a broadcast with a variable by changing it to 1 And back to 0.
Offline
I think you should make pen and stamp on a sprite blocks.
Offline
Scratchie wrote:
How about an <I recive> sensing block?
I also wanted that, because it's annoying to have to keep checking a variable all the time... (I pictured it as <[select from broadcast list] recieved?> but your ways better.)
Offline
I would really like a "toggle" block. It's really annoying to create a variable for each toggle you have. The block will look like this:
Offline
What is the meaning of the toggle block?
Does it mean something like
variable = 1 - variable
if variable == 0
body 1
else
body 2
If so, it is already fairly easy to implement.
Of course, if they ever do the "user defined blocks" to include control blocks, then you would be able to add the toggle-block to the library yourself!
Offline
Scratchie wrote:
How about an <I recive> sensing block?
i thought that the [blocks]<when I receive[ [/blocks] block is basically that
Offline
The current block can only start a script at the beginning. There is no way to wait in the middle of a script for a message.
Offline
kevin_karplus wrote:
What is the meaning of the toggle block?
Does it mean something like
variable = 1 - variable
if variable == 0
body 1
else
body 2
If so, it is already fairly easy to implement.
Of course, if they ever do the "user defined blocks" to include control blocks, then you would be able to add the toggle-block to the library yourself!
Yes, but it's quite annoying to make a variable for each toggle you have. The toggle block would make it fast and easy.
Offline
Since I have never needed a toggle, the lack of it doesn't bother me (I dislike toggle controls of all sorts---I prefer controls that have distinct actions for turning things on and turning them off). I would rather the scratch team concentrated on providing user-definable blocks, so that those who value things like toggle blocks could create their own (and I would undoubtedly start creating my own blocks too).
Having sharable block definitions would be really nice, so that people could share snippets of reusable code more easily.
Offline
kevin_karplus wrote:
Since I have never needed a toggle, the lack of it doesn't bother me (I dislike toggle controls of all sorts---I prefer controls that have distinct actions for turning things on and turning them off). I would rather the scratch team concentrated on providing user-definable blocks, so that those who value things like toggle blocks could create their own (and I would undoubtedly start creating my own blocks too).
Having sharable block definitions would be really nice, so that people could share snippets of reusable code more easily.
Yes, perhaps you're right. People don't use toggles often (I think).
Offline
Here is a block I want:
<when green flag clicked> <or> <when I receive[
Here is another:
ex.
<when green flag clicked>
<go to x 22
<say[ hello! )secs>
<wait until> I receive <- This one
<play note( 72 )for( 3
Offline
The when green-flag or message is easily handled:
just have
[blocks]
<when green flag clicked>
<broadcast[ initmsg
[/blocks]
and put all the active code under the
[blocks]
<when I receive[ initmsg
[/blocks]
Offline
JSO wrote:
MyRedNeptune wrote:
you can already make one single sprite that is bigger than the screen.
Huh i don't think so. You cant make sprites bigger than the screen in the editor, and if you've created a sprite just as big as the screen, it ignores
[blocks]<set size to( more then 100 )%>[/blocks] .
no, i think you can. i've made block that say
[blocks]<set size to( 200 )%>[/blocks]
before. it doesnt ignore it.
kevin_karplus wrote:
The when green-flag or message is easily handled:
just have
[blocks]
<when green flag clicked>
<broadcast[ initmsg
[/blocks]
and put all the active code under the
[blocks]
<when I receive[ initmsg
[/blocks]
but isnt that basically just using the [blocks]<when green flag clicked>[/blocks] block?
Last edited by planetX (2007-11-12 09:28:48)
Offline
one block that i think we need is a
sort of thing. it would help with the scrolling thing too. because you could say
http://scratch.mit.edu/projects/planetX/54022
this could have used a scrolling block, but there wasnt one.
Last edited by planetX (2007-11-12 09:41:26)
Offline
planetX,
music_man asked for a "when green flag or I receive msg" and I showed him how to implement that easily within the existing blocks. Note that the code will be executed whenever the message is sent, and that clicking the green flag causes the message to be sent.
if touching mouse-pointer
already exists (look in the "Sensing" pane)
(OK, it is two general-purpose blocks instead of one special-purpose one, but general-purpose blocks are more useful in programming.)
Offline
i ment that isnt what you showed basically just the green flag block. dont [blocks]<broadcast[ and <when I receive[ [/blocks] cancel each other out when they are for the same sprite and use the same message for recieving and broadcasting?
i know "if touching mouse pointer" already exists, im saying there should be "if mouse pointer touching", which we don't have. for example: you cant say "if edge touching mouse pointer" with the block we have now. but you would be able to say "if mouse pointer touching edge" with my block
Last edited by planetX (2007-11-11 19:39:35)
Offline
Here is one more that would be nice:
<forever if>
<else>
<end>
Here would be a cool random block:
<pick random( 5 <or> 6 ))
and you could add more with this:
(( 3 <or> 9 ))
Ex.
<set x to( <pick random( 35 <or> 92 ))
<set y to( <pick random( 35 <or> (( 3 <or> 9 ))
Last edited by music_man (2007-11-11 19:45:11)
Offline
i think you can already do
[blocks] <forever if>
<else>
<end> [/blocks]
with
[blocks]<forever>
<if>
<else>
<end> [/blocks]
Last edited by planetX (2007-11-12 09:43:25)
Offline
also, in the other topic about scratch blocks, this was suggusted:
Offline
planetX wrote:
also, in the other topic about scratch blocks, this was suggusted:
http://i243.photobucket.com/albums/ff67 … sition.jpg
That's not just a new block, that's a whole new feature!
Offline
My idea for the pick random 5 or 6 would be like this:
<pick random( 52 <or> 29 ))
So it would pick 52 or 29. Not 52 to 29
I guess this one is better down here:
(( 5 <or> 19 ))
Ex.
<when green flag clicked>
<change x by( (( 7 <or> 23 ))
I hope they add this one.
Last edited by music_man (2007-11-12 00:06:40)
Offline
MyRedNeptune wrote:
planetX wrote:
also, in the other topic about scratch blocks, this was suggusted:
That's not just a new block, that's a whole new feature!
i know. but it would make 3-d games a lot more better! all of the 3d games i've seen dont look very 3d
look at my topic about new blocks: http://scratch.mit.edu/forums/viewtopic.php?pid=11347#p11347
Last edited by planetX (2007-11-12 11:49:38)
Offline
I don't like the use of "or" to be a separator in a list, since "or" already has a different meaning.
Perhaps using set notation would be better:
pick random from {7, 29, 53}
Offline
bit isnt it a seperator of a list with what it is now?
[blocks]<< <or> >> [/blocks]
Offline
No, the "or" operator computes a specific function---a Boolean function that is true if either of the arguments are true, false if both are false.
You could as well say that +, -, *, and / are separators.
Instead, computer scientists refer to these as "binary operators".
Offline