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

#1 2007-05-16 20:08:42

liphttam1
Scratcher
Registered: 2007-05-16
Posts: 30

Deleating or "exploding" a sprite

I am making a game,a shooter and I want to know how to get the sprite to dissapeare after its shot. Can anyone help me?


http://www.readwritethink.org/lesson_images/lesson936/butteredtoast-200.jpg

Offline

 

#2 2007-05-16 20:10:08

liphttam1
Scratcher
Registered: 2007-05-16
Posts: 30

Re: Deleating or "exploding" a sprite

sorry, how do i set the bullet to appear at the tip of the gun when the barrel move? thanks


http://www.readwritethink.org/lesson_images/lesson936/butteredtoast-200.jpg

Offline

 

#3 2007-05-16 21:12:52

paulmedwal
Scratcher
Registered: 2007-03-09
Posts: 100+

Re: Deleating or "exploding" a sprite

Put the bullet behind the gun and hide it. Then when you are ready to shoot, show the bullet again. When the bullet hits its target, use the sensing block "when touching __" to detect the bullet and have the object hide. You can see this in two of my games if you download them and look at the blocks http://scratch.mit.edu/projects/paulmedwal/547  and  http://scratch.mit.edu/projects/paulmedwal/455

Paulmedwal


clutter.scratch.mit.edu Visit the Clutter site to create multi-scene stories and multi-level games with Scratch.

Offline

 

#4 2007-05-17 15:34:30

dmagee
Scratcher
Registered: 2007-05-17
Posts: 13

Re: Deleating or "exploding" a sprite

http://scratch.mit.edu/projects/dmagee/3464 is another example of this. It is a simple hide the bullet until fired, then when it hits the object, hide the bullet, change the costume to a explosion, and spin and grow/shrink the explosion to make it look like its exploding. Then hide the explosion. (The growing is only done on the player's ship, the rest just spin)

Offline

 

Board footer