# Shooting replaces existing bullet

**URL:** https://forum.kirupa.com/t/shooting-replaces-existing-bullet/228181
**Category:** Uncategorized
**Created:** [June 5, 2007, 10:29pm UTC](https://forum.kirupa.com/t/shooting-replaces-existing-bullet/228181 "2007-06-05T22:29:03Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![rondog](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rondog/32/2478_2.png) [@rondog](https://forum.kirupa.com/u/rondog)
#### Post date: [June 5, 2007, 10:29pm UTC](https://forum.kirupa.com/t/shooting-replaces-existing-bullet/228181/1 "2007-06-05T22:29:03Z")

</div>

I am shooting a fireball from my character but when I go to hit control again the existing fireball gets erased and replaced with the new one…here is my code

```auto

if (Key.isDown(Key.CONTROL)) {
            for (k=0; k<99; k++) {
                _root.createEmptyMovieClip("fireHolder"+k, depth++);
                _root["fireHolder"+k].attachMovie("fireball", "fireball"+k, depth++);
                _root["fireHolder"+k]._x = this._x;
                _root["fireHolder"+k]._y = this._y;
                _root["fireHolder"+k].onEnterFrame = function() {
                    this._rotation += 20;
                    if (_root.walker._currentframe == 20) {
                        this._x += 10;
                    }
                    if (_root.walker._currentframe == 10) {
                        this._x -= 10;
                    }
                };
            }
        }

```

Also I need to figure out a better way to determine which way the bullet should shoot…if I shoot it, the IF statements work, but if I turn the other way, the bullet turns around too…hehe kinda funny
