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
Offline
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?
Offline
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!
Offline