@Pecola1: You forgot to write add in sensing ops
booleanAttributeNames ^ #('pen down' 'draggable' 'is a clone')
Last edited by scimonster (2011-01-26 08:37:21)
Offline
scimonster wrote:
@Pecola1: You forgot to write add in sensing ops
Code:
booleanAttributeNames ('pen down' ;draggable' 'is a clone')
THX
Offline
Offline
2 more for BYOB. These are case blocks.
Lowercase:
The code:
Uppercase:
The code:
Note: These need the block referred to in the previous post.
Last edited by scimonster (2011-01-24 03:39:49)
Offline
My block has a broken code. The (10) (+) (10) block's repaired code:
workOut: t1 with: t2 to: t3 t2 = '+' ifTrue: [^ t1 + t3]. t2 = '-' ifTrue: [^ t1 - t3]. t2 = '*' ifTrue: [^ t1 * t3]. t2 = '/' ifTrue: [^ t1 / t3]. ^ 0
Offline
Can you make blocks to sense/mess with folders as well as files?
Offline
I have made a VERY useful block:
it is a sensing block that is used to put objects inside of variables:
the "This" block!
it is the most simple block i have ever seen but it is VERY useful,
here is the code:
if using Scratch BlockSpecs>sensing:
('This' #r #getthis)
if using ByOb BlockSpecs>sensing:
('This' r getthis)
in panther just put the code into a new block
code that goes in ScriptableScratchMorph>sensing ops:
getthis
^ self
and that's it! you can now have variables that hold sprites!
IF YOU USE THIS IN A SCRATCH MOD GIVE ME CREDIT!
p.s.
you can use this with any of the below blocks:
<distance to[ ]>
<touching[ ]>
<set{ }to( )>
<point towards( )>
<go to[ ]>
Offline
thanks frowned! a neat first contribution! I don't think you can demand credit, as several other people have come up with the self block and it's already been added to Panther1.1 but I look forward to more contributions from you!
Offline
frowned wrote:
NEW BLOCK:
Clone and Broadcast to clone:("broadcast to new clone %e" #- #cloneAndSend:)
THIS ONE IS ORIGINAL IF YOU INCLUDE IN MOD AND NOT IN PERSONAL VERSION YOU MUST CREDIT
IT IS ALREADY DEFINED. THAT IS NOT YOUR BLOCK.
Offline
I always test before uploading.
Last edited by scimonster (2011-01-26 08:35:45)
Offline
Pecola1 wrote:
scimonster wrote:
@Pecola1: You forgot to write add in sensing ops
Code:
booleanAttributeNames ('pen down' ;draggable' 'is a clone')THX
Oops messed that up big!
booleanAttributeNames ^ #('pen down' 'draggable' 'is a clone')
Offline
frowned wrote:
I Know But It Is An Implementation And I Found That Function!
But you can't take credit unless you CODED it.
Offline
I have a correction to the press start button block:
the code says:
pressGreenFlag
#pressGreenFlagButton
it should be this for it to work:
pressGreenFlag
| t1 |
t1 _ self ownerThatIsA: ScratchFrameMorph.
t1 pressGreenFlagButton
Offline
frowned wrote:
I have a correction to the press start button block:
the code says:pressGreenFlag
#pressGreenFlagButtonit should be this for it to work:
pressGreenFlag
| t1 |
t1 _ self ownerThatIsA: ScratchFrameMorph.
t1 pressGreenFlagButton
I have told sparks this before, however there is a simpler code than even you used:
Pecola1 wrote:
I figured out the
has the wrong code. It wont work. You need to put:Code:
pressFlag self broadcast: 'scratch-startclicked'So it will turn to:
Which also means instead of:
[blocks]<when green flag clicked>[/blocks]
you can do:
[blocks]<when I receive[ scratch-startclicked [/blocks]
or instead of:
[block]<forever>
<move( 10 )steps>
<end>[/blocks]
you can do:
<when green flag clicked>
<move( 10 )steps>
<broadcast[ scratch-startclicked
Last edited by Pecola1 (2011-01-26 19:08:12)
Offline
frowned wrote:
I Know But It Is An Implementation And I Found That Function!
If someone else made it even if you make it afterwards, its like me making the rotation style things, I didn't know that anyone had made it before but later i downloaded bingo and noticed, It wasn't a new discovery, however those scene blocks I made, WERE DISCOVERED BY ME AND NO ONE CAN PUT IT IN THEIR MOD WITHOUT USING MY NAME! AND EVEN THEN THEY BETTER ASK ME BEFORE PUTTING IT IN OR ELSE!
Offline
set rotation center blockspecs:
('set rotation center %s' #- #setrotationcenter:)
set rotation center code:
setrotationcenter: t1
costume rotationCenter = t1
syntax for usage:
"xpos@ypos"
also i will later post my sprite attachment blocks
Offline
I think credit for a block should be given if the block is an as yet undiscovered combination of commands, but single method blocks that just use existing methods that have not been created are there for everyone to find - you didn't really come up with anything new. That's just my opinion, I'm happy to credit people anyway.
Offline
The BYOB error reporter isn't linking to the block makeup. Just to the picture of the block.
Offline
frowned wrote:
set rotation center blockspecs:
('set rotation center %s' #- #setrotationcenter:)
set rotation center code:
setrotationcenter: t1
costume rotationCenter = t1syntax for usage:
"xpos@ypos"
also i will later post my sprite attachment blocks
but i did come up with this
Offline
frowned wrote:
frowned wrote:
set rotation center blockspecs:
('set rotation center %s' #- #setrotationcenter:)
set rotation center code:
setrotationcenter: t1
costume rotationCenter = t1syntax for usage:
"xpos@ypos"
also i will later post my sprite attachment blocksbut i did come up with this
I do agree, you did, the rotation center/centre was already made though. I have not seen the set rotation center though.
Offline