Sunday, June 29, 2014

Some Great Scratchers to check out :)

Skyset
Griffpatch
MrMcProgram
Madison21283
-TheDoctor-
GeoCashing
Scratchifier
CharlieBird
Unrealisation
Unlocked
TheDusk
Leafino
Kavz

Tuesday, June 17, 2014

Lets add a score

So, if you've already had experience with programming, you probably know what a variable is.
A variable is something that holds a value, it can be a number, a word, a boolean value, anything!
So, we are gonna need a variable.
Go to the "Data" scripts tab, and click "Make a Variable".
Go ahead and name it "Score"
So, when the game starts, we want the score to be preset to 0.
Drag the "Set Score to 0" block below the green flag.
Great!
Now, you want the score to change.
So, in the mouse, drag "Change score by 1" block, under "When receive message1" blog.
Yay!
You have score now.

Friday, June 6, 2014

Let's continue our program some more

So, on our last post we made the mouse spawn randomly somewhere on the backdrop.
This time, let's make the cat "nom nom" the mouse.
But as a start, let's just make the mouse disappear whenever the cat touches the mouse.
So let's add an "if" statement inside the "forever" block.

Go to the control section in the scripts, and drag the "if" block into the "forever" block.
Remember, it's in a forever loop so that it checks again, and again, and again, and again and... again.

Now, in the sensing section drag the "touching" block inside of the "condition" part of the if statement.
If the condition is true, this happens, if it isn't, check again.
Click on the little arrow on the "sensing" block and select "mouse1" (Which is the mouse sprite).

We want to tell the mouse to do something, so we use broadcast (inside the events section)
.
If you tell another sprite to receive the message, then the sprite will do whatever you tell it to when it receives the broadcast.

Drag the broadcast block inside of the "if" block.
Your code should now look like this:
Now, let's change the mouse's scripts.
In the sprites section, click on the mouse sprite that we made last time.
In the events section, drag the "When I Receive" block onto the scripts section.
Go to the looks section, and drag "hide" under the "When I Receive" block.
Wait... when you click the green flag to try again, the mouse is gone!

Come on and drag the "show" block just above the "hide" block under the "When Green Flag Clicked" block.
Now try it out!

Next time, we'll add scoring and re-spawning!

Cheers, Codegirl101

Sunday, June 1, 2014

Let's continue our program

On our last post, we made a simple script to make a cat move, now let's make a mouse!
Remember the cat we used in our last program?
It's called a "Sprite".
Now, let's add a mouse sprite.
In the sprites section, click on the button "Import sprite"















Now, go find the mouse sprite.
At the beginning of the game, we want the mouse to appear at a random spot, so lets use a "random" block.
Drag a "When flag clicked" block in the script field and below that, put a "go to" block.
If we want to change it's horizontal position, we better use the part that says "x".
In the "Operators" section, drag that random block into the "go to" block.
Remember to drag it in the "x" :-).
since the far left side of the screen is "-240" and the far right is "240", we change the minimum and maximum values to those. Your code should now look like this:







Press the flag
Yay!
Why don't you do the same thing with "y"?
For "y", the minimum and maximum should be "-180" and "180"
Cheers, Codegirl101