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

#1 2009-10-22 04:35:34

x_andrew_xx
Scratcher
Registered: 2009-10-13
Posts: 8

How to stop a script when.....???

Hey guys how do i stop i script when a sprite hides? Okay here's what i'm doing. I am making a shooting game. I made this sprite shoot every 3 seconds and when it gets hit by another sprite, it hides. But the problem is, the bullet wont stop shooting, how can i fix this?

Offline

 

#2 2009-10-22 05:22:05

fanofcena
Scratcher
Registered: 2008-07-03
Posts: 1000+

Re: How to stop a script when.....???

just make a variable say hit then add that when the enemy bullet hits the varible is changed now in the shooting script enter another if else in the start
if ( hit = true)
{stop script
}
else
{the shoot proggramming here
}
u could also add the function of health instead of hit


http://i53.tinypic.com/2vxr2c0.png Click whats above u might make a cute planet happy ^_^

Offline

 

Board footer