Joeman592 wrote:
Im making my own scratch-based project, and i need some blocks. could you please give me te codes for a <I recieve[^]> conrtrol booolean, a bounce, if touching [^], bounce motion blocks, Think nothing and change costume # by () look blocks, and if you can do thats THANK YOU SOOOOOO MUCH!!!!
you can use the bingo source code when it's released if you know how to wait, or try to figure it out yourself (i suggest you do, i'm not being selfish, it's just that you can WAY better at squeak if you experiment with putting different bits of code together).
Offline
LS97 wrote:
randalpik wrote:
LS97 wrote:
easy. first take out some script in Squeak which automatically fixes it to the current layout, then alt-click buttons and click duplicate. then change the string and the arguments to the new block category.But where is the script?
aaargh! i **** hate my internet connection!!!!!! i have to REPOST!!! I AM MAD AT IT!!! ARGHHHH!!!!!
GO TO: scratch-ui-panes > viewermorph > initialization > rebuildcategories
delete it and click 'delete, then browse senders'. in the senders delete the section of code referred to the rebuildcategories.
note: to add blocks to yur new category, just add the name in quotes somewhere in the blockSpecs, then under the scratchMorph blockSpecs go to blockSpecsColor or something like that and add your desired color (unless you want red then it's automatic).
haha i copied the text now even if it disconnects...
Wait... I can't change the arguments so that it works... it gives me an error
Offline
randalpik wrote:
Wait... I can't change the arguments so that it works... it gives me an error
it didn't to me.. could you post those arguments so that i can figure out what's wrong?
Offline
Hey, i was looking at the new user block catagories on the bingo website, what is World?
Offline
markyparky56 wrote:
Hey, i was looking at the new user block catagories on the bingo website, what is World?
world category is stuff that has to do with the outside world (duh). here's a list of some stuff i put:
- link to website/program
- check connection
- moved sliders from sensing
- tooltip [something]
- <confirm [Sure?]>
- get date/time/weekday/etc
- record sound
- take picture
- show dialog titled [] with [] as contents
that's pretty much everything i came up with till now.
Offline
poppypaynterscratch wrote:
could i join bingo? im *sortof* working on a personal mod.... but i'd rather trash it and work on bingo... im (obviously) familiar with the browser and such... so, could i hepl work on it?
yeah sure you can! submit your entry to the bingo forums' main page and put in your email there (no one apart from me can see it) and i'll get back to you by email asap.
Offline
What's changed in the Paint Editor Screenshot?
Offline
Can you please make the blocks featured here:
http://scratch.mit.edu/projects/sparks/745619
Offline
LS97 wrote:
waveOSBeta wrote:
Can you please add more blocks, LS97?
Yeah sure, i'm just trying to figure out a certain block without success. i'll get on with the other ones and it might come to me.
What is that block?
Offline
Zorbak42 wrote:
Joeman592 wrote:
Im making my own scratch-based project, and i need some blocks. could you please give me te codes for a <I recieve[^]> conrtrol booolean, a bounce, if touching [^], bounce motion blocks, Think nothing and change costume # by () look blocks, and if you can do thats THANK YOU SOOOOOO MUCH!!!!
I can give you code for change costume # by (). Put
Code:
changeCostumeIndexBy: t1 self costumeIndex: self costumeIndex + t1in looks ops of ScriptableScratchMorph instance,
Code:
('change costume by %n' #- #changeCostumeIndexBy: 1)in SpriteMorph blockSpecs, and
Code:
('change background by %n' #- #changeBackgroundIndexBy: 1)in StageMorph blockSpecs. Hope it helps!
THANK YOU SOOOOOOOO MUCH!
Offline
LS97 wrote:
The key_pressed reporter block
a great block that saves you the fuss of making 30 scripts for each different key. just add this to a forever if and youre done with your scripting for a text program! add the block wherever you want, and add this code into the corresponding instance ops.Code:
(Sensor keyPressed: 65) ifTrue: [^ 'a']. (Sensor keyPressed: 66) ifTrue: [^ 'b']. (Sensor keyPressed: 67) ifTrue: [^ 'c']. (Sensor keyPressed: 68) ifTrue: [^ 'd']. (Sensor keyPressed: 69) ifTrue: [^ 'e']. (Sensor keyPressed: 70) ifTrue: [^ 'f']. (Sensor keyPressed: 71) ifTrue: [^ 'g']. (Sensor keyPressed: 72) ifTrue: [^ 'h']. (Sensor keyPressed: 73) ifTrue: [^ 'i']. (Sensor keyPressed: 74) ifTrue: [^ 'j']. (Sensor keyPressed: 75) ifTrue: [^ 'k']. (Sensor keyPressed: 76) ifTrue: [^ 'l']. (Sensor keyPressed: 77) ifTrue: [^ 'm']. (Sensor keyPressed: 78) ifTrue: [^ 'n']. (Sensor keyPressed: 79) ifTrue: [^ 'o']. (Sensor keyPressed: 80) ifTrue: [^ 'p']. (Sensor keyPressed: 81) ifTrue: [^ 'q']. (Sensor keyPressed: 82) ifTrue: [^ 'r']. (Sensor keyPressed: 83) ifTrue: [^ 's']. (Sensor keyPressed: 84) ifTrue: [^ 't']. (Sensor keyPressed: 85) ifTrue: [^ 'u']. (Sensor keyPressed: 86) ifTrue: [^ 'v']. (Sensor keyPressed: 87) ifTrue: [^ 'w']. (Sensor keyPressed: 88) ifTrue: [^ 'x']. (Sensor keyPressed: 89) ifTrue: [^ 'y']. (Sensor keyPressed: 90) ifTrue: [^ 'z']. (Sensor keyPressed: 32) ifTrue: [^ 'space']. (Sensor keyPressed: 1) ifTrue: [^ 'home']. (Sensor keyPressed: 4) ifTrue: [^ 'end']. (Sensor keyPressed: 5) ifTrue: [^ 'insert']. (Sensor keyPressed: 9) ifTrue: [^ 'tab']. (Sensor keyPressed: 11) ifTrue: [^ 'page up']. (Sensor keyPressed: 12) ifTrue: [^ 'page down']. (Sensor keyPressed: 127) ifTrue: [^ 'delete']. ^ 'none'Pretty long eh? don't be discouraged it's worth it!
It didnt work for me... also, shouldnt the blockspec be a boolean instead of a reporter?
Offline
Joeman592 wrote:
Im making my own scratch-based project, and i need some blocks. could you please give me te codes for a <I recieve[^]> conrtrol booolean, a bounce, if touching [^], bounce motion blocks, Think nothing and change costume # by () look blocks, and if you can do thats THANK YOU SOOOOOO MUCH!!!!
I have the change costume # by (), can someone please give me the oithers? I'll give you credit!
Offline
Joeman592 wrote:
Zorbak42 wrote:
Joeman592 wrote:
Im making my own scratch-based project, and i need some blocks. could you please give me te codes for a <I recieve[^]> conrtrol booolean, a bounce, if touching [^], bounce motion blocks, Think nothing and change costume # by () look blocks, and if you can do thats THANK YOU SOOOOOO MUCH!!!!
I can give you code for change costume # by (). Put
Code:
changeCostumeIndexBy: t1 self costumeIndex: self costumeIndex + t1in looks ops of ScriptableScratchMorph instance,
Code:
('change costume by %n' #- #changeCostumeIndexBy: 1)in SpriteMorph blockSpecs, and
Code:
('change background by %n' #- #changeBackgroundIndexBy: 1)in StageMorph blockSpecs. Hope it helps!
THANK YOU SOOOOOOOO MUCH!
You're welcome. I've heard the I receive block is impossible to make, I'm not sure if this is true, but I don't think anyone has it. I'll try to make a bounce block now... ...Almost got it. An error message appeared saying t1 and t2 are undefined or something.
bounce | t1 t2 t3 t4 | t3 _ self rotationDegrees degreesToRadians cos. t4 _ self rotationDegrees degreesToRadians sin negated. t1 left < t2 left ifTrue: [t3 _ t3 abs]. t1 right > t2 right ifTrue: [t3 _ t3 abs negated]. t1 top < t2 top ifTrue: [t4 _ t4 abs negated]. t1 bottom > t2 bottom ifTrue: [t4 _ t4 abs]. self rotationDegrees: (t4 negated asFloat arcTan: t3) radiansToDegrees. self position: self position + (t1 amountToTranslateWithin: t2)
If you find out what's wrong, please let me know. Bounce, if touching, if I can figure out what's wrong with bounce, I might be able to do that. Think nothing, you can just use the say nothing, it will stop what it's thinking too.
('say nothing' #- #sayNothing)
Offline
urhungry wrote:
nXIII wrote:
urhungry wrote:
How do you add more block categories? It's really usefull.
As if I haven't answered this question at least ten times.
where did you?
On the previous page of this thread.
aaargh! i **** hate my internet connection!!!!!! i have to REPOST!!! I AM MAD AT IT!!! ARGHHHH!!!!!
GO TO: scratch-ui-panes > viewermorph > initialization > rebuildcategories
delete it and click 'delete, then browse senders'. in the senders delete the section of code referred to the rebuildcategories.
note: to add blocks to yur new category, just add the name in quotes somewhere in the blockSpecs, then under the scratchMorph blockSpecs go to blockSpecsColor or something like that and add your desired color (unless you want red then it's automatic).
haha i copied the text now even if it disconnects...
EDIT: That wasn't nXIII, I don't know where he answered it.
Last edited by Zorbak42 (2010-04-30 07:45:11)
Offline
randalpik wrote:
LS97 wrote:
The link block
Ok, finally some time to add the greatest block of all. the block links the user to a webpage, program or file as long as the path or URL is given. add in the blockspecs in the control section some kind of block code (choose whatever you want, you know how to do it). and add in the corresponding instance ops:Code:
Cursor wait showWhile: [ScratchPlugin primOpenURL: t1]So little code for such a great block... and remember to click accept!
For people who aren't sure how to put this in the block specs, here's a good way:
Code:
('go to website %s' #- #getLink: 'http://scratch.mit.edu/')The result will be a block that says "go to website [http://scratch.mit.edu/]" wherein scratch.mit.edu is what it says by default.
Where should I put it?
Offline
Zorbak42 wrote:
Joeman592 wrote:
Zorbak42 wrote:
I can give you code for change costume # by (). PutCode:
changeCostumeIndexBy: t1 self costumeIndex: self costumeIndex + t1in looks ops of ScriptableScratchMorph instance,
Code:
('change costume by %n' #- #changeCostumeIndexBy: 1)in SpriteMorph blockSpecs, and
Code:
('change background by %n' #- #changeBackgroundIndexBy: 1)in StageMorph blockSpecs. Hope it helps!
THANK YOU SOOOOOOOO MUCH!
You're welcome. I've heard the I receive block is impossible to make, I'm not sure if this is true, but I don't think anyone has it. I'll try to make a bounce block now... ...Almost got it. An error message appeared saying t1 and t2 are undefined or something.
Code:
bounce | t1 t2 t3 t4 | t3 _ self rotationDegrees degreesToRadians cos. t4 _ self rotationDegrees degreesToRadians sin negated. t1 left < t2 left ifTrue: [t3 _ t3 abs]. t1 right > t2 right ifTrue: [t3 _ t3 abs negated]. t1 top < t2 top ifTrue: [t4 _ t4 abs negated]. t1 bottom > t2 bottom ifTrue: [t4 _ t4 abs]. self rotationDegrees: (t4 negated asFloat arcTan: t3) radiansToDegrees. self position: self position + (t1 amountToTranslateWithin: t2)If you find out what's wrong, please let me know. Bounce, if touching, if I can figure out what's wrong with bounce, I might be able to do that. Think nothing, you can just use the say nothing, it will stop what it's thinking too.
Code:
('say nothing' #- #sayNothing)
You're right that the <when i receive[message\/]> would be impossible, but I think [wait until I receive [message\/]] would be possible.
Offline
LS97 wrote:
markyparky56 wrote:
Hey, i was looking at the new user block catagories on the bingo website, what is World?
world category is stuff that has to do with the outside world (duh). here's a list of some stuff i put:
- link to website/program
- check connection
- moved sliders from sensing
- tooltip [something]
- <confirm [Sure?]>
- get date/time/weekday/etc
- record sound
- take picture
- show dialog titled [] with [] as contents
that's pretty much everything i came up with till now.
Ah... ok.
Offline
LS97 wrote:
randalpik wrote:
Wait... I can't change the arguments so that it works... it gives me an error
it didn't to me.. could you post those arguments so that i can figure out what's wrong?
Ok... so I got rid of the scripts that you said to, and then I alt-clicked the button to duplicate. I alt-clicked on the new button, clicked "change arguments", typed in "dialogs" (that's what I wanted) but the text didn't change. I tried to do that by alt-clicking again and clicking "change label". It gave me this error:
Message not understood: asText
StringMorph(Object)>>error:
StringMorph(Object)>>doesNotUnderstand:
TextMorphForEditView(TextMorph)>>newContents:
TextMorphForEditView(TextMorph)>>contents:wrappedTo:
PluggableTextMorph>>setText:
PluggableTextMorph>>on:text:accept:readSelection:menu:
PluggableTextMorph class>>on:text:accept:readSelection:menu:
FillInTheBlankMorph>>setQuery:initialAnswer:answerHeight:acceptOnCR:
FillInTheBlankMorph class>>request:initialAnswer:centerAt:inWorld:onCancelReturn:acceptOnCR:
FillInTheBlankMorph class>>request:initialAnswer:centerAt:inWorld:onCancelReturn:
Edit: Oh, and then I found where it said "asText" and got rid of it. It gave me this emergency error and Scratch crashed. Didn't have time to copy-paste.
Last edited by randalpik (2010-04-30 11:25:41)
Offline
waveOSBeta wrote:
What's changed in the Paint Editor Screenshot?
nothing yet.
Offline
randalpik wrote:
Ok... so I got rid of the scripts that you said to, and then I alt-clicked the button to duplicate. I alt-clicked on the new button, clicked "change arguments", typed in "dialogs" (that's what I wanted) but the text didn't change. I tried to do that by alt-clicking again and clicking "change label". It gave me an error.
the dialog bit is fine, that's what you need to do. to change the label you need to first drag it around, then shift-click the label and type in what you want. then make sure you embed it into the scratchViewerMorph
Offline
Sparkyasa wrote:
You're right that the <when i receive[message\/]> would be impossible, but I think [wait until I receive [message\/]] would be possible.
No ... nothing's impossible given time ... but anyways, that actually is quite possible. Without excess time.
LS97 wrote:
randalpik wrote:
Ok... so I got rid of the scripts that you said to, and then I alt-clicked the button to duplicate. I alt-clicked on the new button, clicked "change arguments", typed in "dialogs" (that's what I wanted) but the text didn't change. I tried to do that by alt-clicking again and clicking "change label". It gave me an error.
the dialog bit is fine, that's what you need to do. to change the label you need to first drag it around, then shift-click the label and type in what you want. then make sure you embed it into the scratchViewerMorph
Ick, why would you do it THAT way... that's so un-permanent. You should edit the initialization or startup methods for ScratchVeiwerMorph or ScratchFrameMorph
Last edited by nXIII (2010-04-30 17:20:36)
Offline