how would i fix a glitch in my mod? when i load a project with a 'forever' block, it turns into a 'repeat until obsolete' block. please help! do i have to make a 'compadability mode' like billeyedward's STREAK mod?
Offline
Joeman592 wrote:
comp500 wrote:
Can i have:
create sprite [] run code
(code)
<end>
With the spec?
It creates a sprite named[] and runs the code on it.
Comp500:)i think the creat sprite is good and then with code would be good too. I'll try to make em but im not very good with squeak so LS97 or nXIII will also have to do it. They are MUCH MUCH(times 9999999999999999999999) better than me.
Me too.
Offline
comp500 wrote:
Joeman592 wrote:
comp500 wrote:
Can i have:
create sprite [] run code
(code)
<end>
With the spec?
It creates a sprite named[] and runs the code on it.
Comp500:)i think the creat sprite is good and then with code would be good too. I'll try to make em but im not very good with squeak so LS97 or nXIII will also have to do it. They are MUCH MUCH(times 9999999999999999999999) better than me.
Me too.
hmm... use nXIII's script to duplicate it, and then add that broadcast bit to run on clones only. that should be close enough to wha you want
Offline
LS97 wrote:
comp500 wrote:
Joeman592 wrote:
i think the creat sprite is good and then with code would be good too. I'll try to make em but im not very good with squeak so LS97 or nXIII will also have to do it. They are MUCH MUCH(times 9999999999999999999999) better than me.
Me too.
hmm... use nXIII's script to duplicate it, and then add that broadcast bit to run on clones only. that should be close enough to wha you want
Where is the duplicate script? that'll b way cool:)
EDIT:Nevermind.
Comp500
Last edited by comp500 (2010-05-15 12:13:33)
Offline
Sperry wrote:
Jakey22 wrote:
I need some code for a <[] contains []> block.
I think it is:
Code:
if: t1 contains: t2 ^ (t1 findString: t2)Does that work?
I tried it and it didn't work, although I might have written the block-specs wrong. also, it is supposed to be a boolean.
Offline
Jakey22 wrote:
Sperry wrote:
Jakey22 wrote:
I need some code for a <[] contains []> block.
I think it is:
Code:
if: t1 contains: t2 ^ (t1 findString: t2)Does that work?
I tried it and it didn't work, although I might have written the block-specs wrong. also, it is supposed to be a boolean.
if: t1 contains: t2 if (t1 findString: t2) then ^ true else ^ false
That should work...
Offline
Joeman592 wrote:
pyrodon wrote:
Joeman592 wrote:
put it in sensing. Scratch-objects, scritpable sprite(or stage, put it in both)morph, sensing. Put the code in blah blah blah, then go to class and make the spec. do it again for the stage/sprite morph(if you did one or the other first) if you want it to be a bounce at te end, put it in motion.
I tried, but I get the error:
Code:
Message not understood: Bounds Symbol(Object)>>error: [] in PasteUpMorph>>runStepMethods [] in BlockContext>>ifError: Symbol(Object)>>error: Symbol(Object)>>doesNotUnderstand: ScratchSpriteMorph>>sprite:touching: ReporterBlockMorph(CommandBlockMorph)>>evaluateWithArgs: ScratchProcess>>applyPrimitive ScratchProcess>>evaluateCommandFor: ScratchProcess>>evaluateFor:Maybe I have the wrong codes or something. Anyone know a code that they are sure works?
well... i dont... anyway, i don't get what this code is. could you put the actual code without the error messages? then we can see if its wrong
Ok, sorry. Here it is:
sprite: t1 touching: t2 | t3 | t3 _ t1 bounds intersect: t2 bounds. (t3 width > 0 and: [t3 height > 0]) ifTrue: [^ true]. ^ false
I got it from LS97's post on page 2. Maybe I even have the block spec wrong, but I'm pretty sure it's right. Plus, the "Bounds" error doesn't seem to have anything to do with a wrong block spec.
Offline
pyrodon wrote:
Joeman592 wrote:
pyrodon wrote:
I tried, but I get the error:Code:
Message not understood: Bounds Symbol(Object)>>error: [] in PasteUpMorph>>runStepMethods [] in BlockContext>>ifError: Symbol(Object)>>error: Symbol(Object)>>doesNotUnderstand: ScratchSpriteMorph>>sprite:touching: ReporterBlockMorph(CommandBlockMorph)>>evaluateWithArgs: ScratchProcess>>applyPrimitive ScratchProcess>>evaluateCommandFor: ScratchProcess>>evaluateFor:Maybe I have the wrong codes or something. Anyone know a code that they are sure works?
well... i dont... anyway, i don't get what this code is. could you put the actual code without the error messages? then we can see if its wrong
Ok, sorry. Here it is:
Code:
sprite: t1 touching: t2 | t3 | t3 _ t1 bounds intersect: t2 bounds. (t3 width > 0 and: [t3 height > 0]) ifTrue: [^ true]. ^ falseI got it from LS97's post on page 2. Maybe I even have the block spec wrong, but I'm pretty sure it's right. Plus, the "Bounds" error doesn't seem to have anything to do with a wrong block spec.
came up with an error for me too. Hmmm.... LS97, could you try to fix it?
Offline
ScratchReallyROCKS wrote:
no instance needed
WHY MUST YOU REFER TO THEM AS INSTANCES?!
Gosh, people, learn your vocab! Instances are objects with classes as their data types!
It's called a message or a method.
Offline
nXIII wrote:
ScratchReallyROCKS wrote:
no instance needed
WHY MUST YOU REFER TO THEM AS INSTANCES?!
Gosh, people, learn your vocab! Instances are objects with classes as their data types!
It's called a message or a method.
Where's your duplicate code,nXIII?
Comp500
Last edited by comp500 (2010-05-15 12:14:28)
Offline
Joeman592 wrote:
Catwalk923 wrote:
HELP!!! I can't find the code grabFromScreen!!! How do I add it? I tried the block, but it does not know what #grabFromSceen means! HELP!!!
are you using scratch 1.3 or 1.4 it might matter. also, try just copying and pasting if you didn't already do that
I have 1.4, and copy what???
Offline
nXIII wrote:
ScratchReallyROCKS wrote:
no instance needed
WHY MUST YOU REFER TO THEM AS INSTANCES?!
Gosh, people, learn your vocab! Instances are objects with classes as their data types!
It's called a message or a method.
Than why is the tab in the VM called 'instances'
Offline
ScratchReallyROCKS wrote:
nXIII wrote:
ScratchReallyROCKS wrote:
no instance needed
WHY MUST YOU REFER TO THEM AS INSTANCES?!
Gosh, people, learn your vocab! Instances are objects with classes as their data types!
It's called a message or a method.Than why is the tab in the VM called 'instances'
It's called "instance". BIG DIFFERENCE!
Offline
MathWizz wrote:
It's called "instance". BIG DIFFERENCE!
Forget I asked
Offline
"'create sprite with name []'" block? and if that is possible, how about "'create sprite with name [] and code' #c" AND how about "'create sprite with name [] , code,' #c and draw costume'" that might be too much... but please try cuz i cant make em
Offline
ScratchReallyROCKS wrote:
nXIII wrote:
ScratchReallyROCKS wrote:
no instance needed
WHY MUST YOU REFER TO THEM AS INSTANCES?!
Gosh, people, learn your vocab! Instances are objects with classes as their data types!
It's called a message or a method.Than why is the tab in the VM called 'instances'
instance, and that means they are INSTANCE METHODS. That means they are specific to an instance, rather than class methods, which are sent to the class itself, not an instance.
Offline
Catwalk923 wrote:
Joeman592 wrote:
Catwalk923 wrote:
HELP!!! I can't find the code grabFromScreen!!! How do I add it? I tried the block, but it does not know what #grabFromSceen means! HELP!!!
are you using scratch 1.3 or 1.4 it might matter. also, try just copying and pasting if you didn't already do that
I have 1.4, and copy what???
are you running the code in the stage?? if you are try using it in a sprite.
Last edited by comp500 (2010-05-16 03:22:36)
Offline
too lazy too find the quote...
the sprite touching sprite reports if two sprites are touching, but it cant be the sprite the code's in and it cant be the mouse, nor can it be blank. otherwise it works. 100% sure about it.
Offline
PANTHER IS OUT!!!
It lets you go into the code to find how a block is made.
Sadly, the "received?" block doesn't work, so we'll have to go without it until the panther team fixes the bug. I might add that a lot of the watchers cause an error
Anyway, this is really exciting!!!
Offline
randalpik wrote:
PANTHER IS OUT!!!
It lets you go into the code to find how a block is made.
Sadly, the "received?" block doesn't work, so we'll have to go without it until the panther team fixes the bug. I might add that a lot of the watchers cause an error
Anyway, this is really exciting!!!
It does work, like this:
When =/ clicked
broadcast something
When I receive something
wait (5)
PUT HAT HERE
wait until something is recieved
DO SOMETHING HERE
After the 'when I receive ___" script is done, it reports false, that's what wait 5 is for.
Offline
When Sep explained it, I think I get it now.
Ok, here is the code (credit to Panther team, I guess that I have to say that now that Sep is monitoring the forum. Oh, and nxIII threatened to sue me if I didn't put this: "Panther is developed by the scratch users Sparks, nXIII, Sperry, SeptimusHeap, MathWizz, and Markyparky56 and is based on Scratch from the MIT media labs." I mean, seriously? Do I really have to put all the members of the panther team? Anyway...):
eventReceivedNamed: t1 | t2 t3 | self isSprite ifTrue: [^ (self ownerThatIsA: ScratchStageMorph) eventReceivedNamed: t1]. t2 _ self scripts select: [:t4 | t4 class == EventHatMorph and: [t4 eventName caseInsensitiveEqual: t1]]. t2 _ t2 asOrderedCollection. self submorphsDo: [:t5 | (t5 isKindOf: ScriptableScratchMorph) ifTrue: [(t5 scripts select: [:t4 | t4 class == EventHatMorph and: [t4 eventName caseInsensitiveEqual: t1]]) do: [:t6 | t2 _ t2 copyWith: t6]]]. t3 _ t2 select: [:t4 | t4 scratchProc notNil]. ^ t3 size > 0
And, for the squeak noobs in the forum, here is the spec:
('%e received?' #b #eventReceivedNamed:)
That should work. I didn't test the spec.
Last edited by randalpik (2010-05-16 21:08:03)
Offline
nXIII wrote:
I think you have to say that because I CAN SUE YOU IF YOU DON'T
ok, ok (edits post) but still, you can't sue me:
(1) you don't know where I live
(2) I'm under 18
(3) panther is free anyway
Offline