Hi,Brass45 here,and I have a suggestion for a new block that could be added to scratch.I was wondering about a block that could be in the "pen" block section that would read,"Stamp Sprite(variable)".This would copy a specified sprite and all of it's scripts,similar to the copy sprite tool but it would be used during a game.This would be useful for games with multiple enemies or tower defense games,both of which would be made much easier to make by this block.Just a suggestion,but I think a block like this would have many applications in scratch easier.I hope that this feature will become a reality one day,and thanks for listening.
Offline
It's _not_ needed. Just make a script like this in one sprite:
[blocks]
<when green flag clicked>
<set{ sprite_to_stamp }to( catface
<broadcast[ stamp other sprite in Sprite1's position
[/blocks]
And in the "catface" sprite make this script:
[blocks]
<when I receive[ stamp other sprite in Sprite1's position
<if> <( <{ sprite_to_stamp }> <=> catface )>
<go to x x position of Sprite1 )y y position of Sprite1
<stamp>
[/blocks]
Last edited by filo5 (2009-08-18 12:17:54)
Offline
filo5 wrote:
It's _not_ needed. Just make a script like this in one sprite:
[blocks]
<when green flag clicked>
<set{ sprite_to_stamp }to( catface
<broadcast[ stamp other sprite in Sprite1's position
[/blocks]
And in the "catface" sprite make this script:
[blocks]
<when I receive[ stamp other sprite in Sprite1's position
<if> <( <{ sprite_to_stamp }> <=> catface )>
<go to x x position of Sprite1 )y y position of Sprite1
<stamp>
[/blocks]
but then its just stamped and it cant move or have scrips.
Offline
Of course it can! Stamped means it's currently "worn" costume is copied to the Pen's layer, but the sprite itself can move, have other scripts, change costumes without altering the stamped image. To get rid of a stamp, you have to invoke Pen's "clear" block.
Offline
sccar3 is right about one thing:you can't copy any scripts during gameplay.A TD(Tower Defense)game requires multiples of the same turret type to track and fire at an enemy with a diffrent range and fire rate if it's at a higher level than a tower of the same type,a technique that currently requires several sprites and multiple variables.A copy sprite block would have a profound effect on making these types of games.
Offline
filo5 wrote:
Of course it can! Stamped means it's currently "worn" costume is copied to the Pen's layer, but the sprite itself can move, have other scripts, change costumes without altering the stamped image. To get rid of a stamp, you have to invoke Pen's "clear" block.
However,scarr3 was talking about the STAMP,not the actual sprite
Offline
I also would love to be able to clone sprites. Currently you have to export and reimport if you want to duplicate a sprite and some parts of the script have to be reselected. Even better if you could pass sprites between different applications running scratch with the connector....
Offline
redware wrote:
I also would love to be able to clone sprites. Currently you have to export and reimport if you want to duplicate a sprite and some parts of the script have to be reselected.
Not really. You right-click on the sprite you want to duplicate (in the sprite menu or on the screen) and select 'duplicate'.
So you want to have a block that'll duplicate a sprite in mid-game? That'd be nice, but the scripts would need to be activated when you duplicated the sprite, right? I don't see how Scratch would sense what scripts would need to be running on the duplicated sprite.
Offline
It would actually be easy for a copied sprite to respond to the scripts by using either a "When I Recieve" or a "Forever"block
Offline
big-bang wrote:
I'd like to see an [eraser] counterpart to all pen blocks (except for the pen colour and shade blocks). So...
[eraser down]
[eraser up]
[change eraser size by (whatever)]
[set eraser size to (whatever)]
Good idea
Offline
That's a pretty good idea, but there would have to be another block to go with it:<when I am copied>
Offline