Well. It's not the MySQL code that's the problem. It's the server itself. Also, We could host the images on the scratchr domain though our block generator will eventually replace images.
I've tried misc before for code. No one pays it any attention as it get buried under all the odd posts
Offline
Sorry for not working on the block generator, but something went wrong with Norton Internet Security and it blocked everything from accessing the internet. I've reinstalled and it works again.
Offline
sparks wrote:
Oh dear Does that mean you can start work on it again now?
Yes, although I don't have much time on weekdays, especially Wednesdays.
Offline
I'm trying to find scripts that will let a sprite bounce off a sprite. But I cant find one! would you get it up for me?
Offline
guitarherofan wrote:
I'm trying to find scripts that will let a sprite bounce off a sprite. But I cant find one! would you get it up for me?
The Block Library is for blocks that won't work in normal Scratch; in fact, Advanced Topics is for programming languages outside Scratch itself (including Squeak, the base for Scratch). Questions about Scratch belong in All About Scratch.
I believe the script you need is:
if <touching sprite> {
turn 180 degrees
}
It doesn't matter which way it turns.
Offline
Greenatic wrote:
guitarherofan wrote:
I'm trying to find scripts that will let a sprite bounce off a sprite. But I cant find one! would you get it up for me?
The Block Library is for blocks that won't work in normal Scratch; in fact, Advanced Topics is for programming languages outside Scratch itself (including Squeak, the base for Scratch). Questions about Scratch belong in All About Scratch.
I believe the script you need is:
if <touching sprite> {
turn 180 degrees
}
It doesn't matter which way it turns.
turn 360 - direction
would work better
Offline
rookwood101 wrote:
Greenatic wrote:
guitarherofan wrote:
I'm trying to find scripts that will let a sprite bounce off a sprite. But I cant find one! would you get it up for me?
The Block Library is for blocks that won't work in normal Scratch; in fact, Advanced Topics is for programming languages outside Scratch itself (including Squeak, the base for Scratch). Questions about Scratch belong in All About Scratch.
I believe the script you need is:
if <touching sprite> {
turn 180 degrees
}
It doesn't matter which way it turns.turn 360 - direction
would work better
Actually, that wouldn't work at all.
Offline
Greenatic wrote:
rookwood101 wrote:
Greenatic wrote:
The Block Library is for blocks that won't work in normal Scratch; in fact, Advanced Topics is for programming languages outside Scratch itself (including Squeak, the base for Scratch). Questions about Scratch belong in All About Scratch.
I believe the script you need is:
if <touching sprite> {
turn 180 degrees
}
It doesn't matter which way it turns.turn 360 - direction
would work betterActually, that wouldn't work at all.
LOL I have looked into this a lot, it depends on WHERE you have i hit, if its to the left one method say, turn 90-direction (cant remember) but on the top 90 - 0 would be turning 90, and that wouldn't work. I have worked hard and long on it. Haven't found it yet.
Offline
sparks, what Image API were you talking about?
Offline
Greenatic wrote:
rookwood101 wrote:
Greenatic wrote:
The Block Library is for blocks that won't work in normal Scratch; in fact, Advanced Topics is for programming languages outside Scratch itself (including Squeak, the base for Scratch). Questions about Scratch belong in All About Scratch.
I believe the script you need is:
if <touching sprite> {
turn 180 degrees
}
It doesn't matter which way it turns.turn 360 - direction
would work betterActually, that wouldn't work at all.
It seems to work in my pong project fine. (take a look at the ball sprite)
Last edited by rookwood101 (2011-09-29 14:21:00)
Offline
rookwood101 wrote:
Greenatic wrote:
rookwood101 wrote:
turn 360 - direction
would work betterActually, that wouldn't work at all.
It seems to work in my pong project fine. (take a look at the ball sprite)
I think you meant point in direction 360 - direction.
Offline
Zparx wrote:
I'm so confused! I don't get how this stuff works. How do you use these blocks in your projects? Is there seperate software to use?
These blocks can be added to Scratch by entering the browser, often referred to as "hacking Scratch," even though it isn't illegal. However, very few of these blocks work on a normal, non-hacked Scratch, and I don't believe any of them (except stretch blocks, and those only in the Java player) will work online.
Offline
Greenatic wrote:
Zparx wrote:
I'm so confused! I don't get how this stuff works. How do you use these blocks in your projects? Is there seperate software to use?
These blocks can be added to Scratch by entering the browser, often referred to as "hacking Scratch," even though it isn't illegal. However, very few of these blocks work on a normal, non-hacked Scratch, and I don't believe any of them (except stretch blocks, and those only in the Java player) will work online.
How can I add the blocks? I would LOVE that!
Offline
Zparx wrote:
Greenatic wrote:
Zparx wrote:
I'm so confused! I don't get how this stuff works. How do you use these blocks in your projects? Is there seperate software to use?
These blocks can be added to Scratch by entering the browser, often referred to as "hacking Scratch," even though it isn't illegal. However, very few of these blocks work on a normal, non-hacked Scratch, and I don't believe any of them (except stretch blocks, and those only in the Java player) will work online.
How can I add the blocks? I would LOVE that!
To add these blocks:
1. Open Scratch.
2. Hold down the shift key and click the upper-right part of the "R" in the Scratch logo in the top-left of the screen. Note: Some computers may use a different key, such as alt, to achieve the same effect.
3. Select "turn fill screen off."
4. A whitish-grey area will appear at the right and bottom of the Scratch window.
You are now in the developer mode for Scratch. Many interesting things can be done here. To add blocks:
1. Click the whitish-grey area.
2. Select "open...", then "browser".
3. You'll see a green window appear.
Navigate the browser to add your code. In the forums, file paths are most often posted like this:
SomethingHere1 > SomethingHere2 > SomethingHere3 > SomethingHere4 (the "method")
Assuming this was a real filepath, you would find SomethingHere1 in the left panel and click it. Options would appear in the next panel. You would find SomethingHere2 and click it, and more options would appear. You would keep doing this until you got to SomethingHere4. When you clicked that, the code would appear.
Important Note: Instance and Class
At the second panel, you'll see two buttons, "instance" and "class". When clicked, these change what methods you can see. Most methods are under instance, but all blockspecs are under class.
Note: To save changes, right-click and select "accept (s)". If it asks for your initials, type in anything. It doesn't matter what you type, as long as you type something.
Essential to every block is the blockspec. To do that, go to Scratch-Objects. Pick one of these three options:
ScratchSpriteMorph: Sprite-only blocks, such as motion
ScratchStageMorph: Stage-only blocks
ScriptableScratchMorph: Sprite and Stage blocks
Note: Stage and Sprite sensing blocks must be placed under both ScratchSpriteMorph and ScratchStageMorph, instead of just ScriptableScratchMorph.
Then click "class", "block specs" and then "blockSpecs".
To add the blockspec:
Here is the code for ScratchStageMorph's blockSpec method:
blockSpecs | t1 | t1 _ #('sensing' ('ask %s and wait' #s #doAsk 'What''s your name?') ('answer' #r #answer) #- ('mouse x' #r #mouseX) ('mouse y' #r #mouseY) ('mouse down?' #b #mousePressed) #- ('key %k pressed?' #b #keyPressed: 'space') #- ('reset timer' #- #timerReset) ('timer' #r #timer) #- ('%a of %m' #r #getAttribute:of:) #- ('loudness' #r #soundLevel) ('loud?' #b #isLoud) #~ ('%H sensor value' #r #sensor: 'slider') ('sensor %h?' #b #sensorPressed: 'button pressed') 'looks' ('switch to background %l' #- #showBackground: 'background1') ('next background' #- #nextBackground) ('background #' #r #backgroundIndex) #- ('change %g effect by %n' #- #changeGraphicEffect:by: 'color' 25) ('set %g effect to %n' #- #setGraphicEffect:to: 'color' 0) ('clear graphic effects' #- #filterReset) #- 'pen' ('clear' #- #clearPenTrails) ). ^ t1 , super blockSpecs
If you wanted to add a block to looks, you would find the word 'looks', with quotes, put the blockspec after it, and save.
To add a method:
Go to SomethingHere1 > SomethingHere2 > SomethingHere3, but don't click anything in the far right panel. You'll see this in the code area:
message selector and argument names "comment stating purpose of message" | temporary variable names | statements
Replace that with your code, and save.
To change a method:
That's what you did when you added the blockspec. Just do that!
IMPORTANT NOTE:
When you're done, right-click the "R" in the Scratch logo like you did to turn of fillscreen, and select "save image for end-user". This closes Scratch and saves your changes. Next time you open Scratch, it will use the new code.
I hope that covered everything.
Offline
sparks wrote:
ProgrammingFreak wrote:
sparks, what Image API were you talking about?
The block rendering one you're working on!
For the Block website?
Offline
Zparx wrote:
Greenatic wrote:
I hope that covered everything.
Wow thank you!
No problem!
Offline
Greenatic wrote:
rookwood101 wrote:
Greenatic wrote:
Actually, that wouldn't work at all.It seems to work in my pong project fine. (take a look at the ball sprite)
I think you meant point in direction 360 - direction.
lol oh yeh silly me.
Offline
('Safe Tangent of %n' #r #tanSafe: #90) tanSafe: aNumber " Replace ^10000 by your desired safety catch for tan 90 " aNumber \\ 90 = 0 ifTrue: [^ 10000]. ^ aNumber degreesToRadians tan ('Safe %n / %n' #r #safe:div: #0 #0) safe: a div: b " Replace ^0 by your desired safety catch for n/0 " b = 0 ifTrue: [^0]. ^a/b ('Safe sqrt %n' #r #safesqrt: #-1) safesqrt: a ^ a abs sqrt
Perform the calculations with error catching and fixing.
Offline
sparks wrote:
ProgrammingFreak wrote:
sparks wrote:
The block rendering one you're working on!For the Block website?
Yes
I don't remember saying I was going to do it.
I thought that was TheSuccessor, remember?
I can do it though.
Offline