# Bullets?

**URL:** https://forum.kirupa.com/t/bullets/55684
**Category:** flash
**Created:** [June 26, 2004, 8:02pm UTC](https://forum.kirupa.com/t/bullets/55684 "2004-06-26T20:02:11Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![gt\_X\_lt](https://avatars.discourse-cdn.com/v4/letter/g/34f0e0/32.png) [@gt\_X\_lt](https://forum.kirupa.com/u/gt_X_lt)
#### Post date: [June 26, 2004, 8:02pm UTC](https://forum.kirupa.com/t/bullets/55684/1 "2004-06-26T20:02:11Z")

</div>

Hello.

I am making a simple space game where you fly along and can strafe side to side. I have made my spaceship so that it can shoot bullets 🙂

What i would like to know is what do i need to do so that when a bullet hits an enemy ship that ship explodes?

**//This is how i made my bullets**  
First of all i made a movie clip called ‘bullet’ which has an instance name of bullet.

I applied this script to the bullet

```auto

onClipEvent(load)
{
 speedX = 25
}
 
onClipEvent(enterframe)
{
 for (var i = 0; i < speedX; i++)
 {
  _x++;
 }
}

```

And then i applied this spcript to the spaceship that shoots the bullets

```auto

//Bullet Shooting
onClipEvent (load)
{
 i = 0
 timer = 0
 dir = "right"
}
onClipEvent(enterframe)
{
 if (!Key.isDown(Key.SPACE))
 {
  timer = 5
 }
 if (Key.isDown(Key.SPACE))
 {
  if (timer >=5)
  {
   i++
   if (dir == "right")
   {
	duplicateMovieClip("_root.Bullet", "Bullet" + i, i);
	_root["Bullet" + i]._x = this._x
	_root["Bullet" + i]._y = this._y - 0
	_root["Bullet" + i]._visible = true
   }
   
   timer = 0
  }
  timer++
 }
}
//

```

Please help me 😃
