This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2008-08-29 16:24:07

woofwoof301
Scratcher
Registered: 2008-06-01
Posts: 100+

blocks

Hi, I'm Eric. I know I'm late in the new blocks thingy, but I still have some ideas.
I've wanted to build a Canyon Defense, based on a Miniclip game. Here they are:
[blocks] <stamp>[/blocks] would make a new sprite and stamp it there. So if I want to place a turret, I would put stamp and a new sprite will go there.
Another good block would be a "when I receive ( )" in the touch section, where it would be pointy. Hold on, I gotta go. Seeya people, and please respond with ideas and support.


Eric   big_smile

Offline

 

#2 2008-08-29 17:22:39

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: blocks

O.K., this will be in the order you said it:

You mean like duplicateMovieClip(o,o,o) in Flash? A version does have this. It is in advanced topics, I forget where

Impossible. Those "pointy" blocks are boolean (true/false FYI) and "when I receive" isn't boolean, is it?


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#3 2008-08-29 17:56:29

fullmoon
Retired Community Moderator
Registered: 2007-06-04
Posts: 1000+

Re: blocks

LOL, when I was introduced to Scratch I thought "stamp" duplicated sprites, too! As Bluestribute said, there is an experimental version of Scratch with the stamp feature you mentioned (called dynamic duplication in the programming world) avaliable for download here. It won't let you upload projects to the web, though.

Bluestribute is once again right about the <I receive> pointy (boolean) block. When you look at all of those blocks, like <touching sprite1?> and <variable=7>, you'll notice that they're always either true or false. A sprite is always either touching sprite1 or not touching it, right? And a variable either equals 7 or it doesn't. But broadcasts are instantaneous, so they happen and pass. Think of it this way: a boolean pointy block is like a light switch: either on or off. But a broadcast is like a gunshot; a momentary action that triggers another action. Instead of <I receive?>, try this method:

When flag clicked:
set IreceivedBroadcast to 0
repeat until <(Ireceivedbroadcast)=1>
   move 1 step
end of repeat

When I receive [broadcast]
set IreceivedBroadcast to 1

Does this help? Let me know if you're still confused. Otherwise, good luck with your game!


http://i302.photobucket.com/albums/nn100/fullmoon32/wow.jpg

Offline

 

Board footer