Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Adding Enemies



http://files.deviantart.com/f/2004/213/2/5/si.swf

I need to add enemies like a mushroom that can only be destroy if the motocycle hits it, does anyone know hot to do that? PLEASE TELL ME!! Im a NEWbie.



FlashKit > Flash Help > Flash MX
Posted on: 07-31-2004, 09:18 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

[F8] Adding Enemies And Attacks To My Game.
how do u do it? lol
i am really new at this and i don't know much about this but i like it and so far it has been fun working with flash. i am in the process of creating my first game. at the moment, it has my character and the ability to jump from platform to platform. what i want to add to it are multiple enemies that can jump around on the platforms also and i want to be able to attack them.

i have searched the tutorial section and so far i have found nothing that can help me.

if anyone is willing to help me even in the slightest, i would be greatly obliged.

EDIT: i have encountered another problem. i added a scrolling background too my game but when the character walks on the background platforms and the floor, it slowly starts to sink in to them and below them until it falls through them completely.


thank you for your time,
Squidgie

Help With Enemies
http://www20.brinkster.com/dirtymon...0the%20Game.swf

copy and paste that link into your browser

when it shows up click into the window and start playing

a-throws stars
s-does a combo
d-uses a sword
down is duck(when ducking press left or right to roll)
left and right is walk (tap space while walking to run)



attack the enemies and notice that only one dies(disappears) while the rest stay alive...can anyone help me? i'll post the coding if anyone needs it

also

a unwanted ninja star flies across the screen at the beginning..anyone have ideas on how i could get it to not do that

this game is not nearly done so i dont need criticism on it

Enemies
does ne 1 know how to make an enemy follow / attack you in MX?

[F8] Following Enemies
Hello flash kitters

Could someone help me with a code that I've been searching for a while? This code that I'm looking for is supposed like this...

There is a hero/character and hes surrounded by zombies!!!!
But then the zombies that are surrounding him aren't coming to attack. This is because I'm looking for a code which lets the zombie to follow the hero/characters path. Also something to make the zombie look realistic! Like smooth rotation when it's turning. It's supposed to be real lifeish

In advance thank you!

Enemies :)
hey there fellas !

i just learned create and fire bullets today.. horray for me.. lol problem is.. i dont know how to create stuff to shoot at.

like moving enemies or something. can anyone help me out please? thanks in advance

Killing Enemies
Say I had my hero walk into an enemy. I want to show my enemy "dead". So instead of it moving around and whatever, i want it to change to it's dead version. Can anyone point me in the right direction, I know its something to do with hittest.

I hope I've explained well enough.
Thank you.

Random Enemies
Can how me figure out a code to program enimies to walk around on there own and try and attack my charecter?

[F8] Multiple Enemies
I am making a platformer style side scroller game.

I don't know how to explain it correctly, so heres the link
http://school.timswildwackyemporium....est/stick.html

heres the FLA

(just press skip until you get to the mountain level)

As you can see, the first enemy comes in right after the store. That enemy is just put right in to the clip and It seems as if I can only have one of it.

How would I make it so that I can put an unlimited amount of enemies on each frame?

Can't Destroy The Enemies
i creating a game but i cant get the enemies to die when the missile hits them. if you want a look at my code email me at lvant1@eq.edu.au

Remove Enemies
I am not flash professional, but I am trying to learn myself. This time I am trying to develop one simple game using flash 8.0 just to learn, but I got stuck at one point “How to remove enemies at runtime when we shoot to enemy??? ”

I have no idea how to program this any help would be appreciated.

thanks

Spawning Enemies?
I would like to spawn enemies and have them scroll across the screen, much like in the game Squares2.

http://www.albinoblacksheep.com/flash/squares2

What would be the best way to accomplish this via AS3?

Multiple Enemies
Hello again!

Here's what I'd like some help with:

1. Add multiple enemies.
2. When a bullet hits an enemy they should both dissapear.
3. A moveable background (stacked in infinity).
...and if it's not to much to ask
4. After a while, change enemies that are a bit harder to kill.

Here's the code now:

var mySound=new Sound();
mySound.setVolume("20");
mySound.loadSound("song.mp3",true);

_root.score = 0;

chaosCopter_mc.onEnterFrame = function() {
if (Key.isDown(68)) {
this._x += 10;
if (this._x>850) {
this._x = 850;
}
}
if (Key.isDown(65)) {
this._x -= 10;
if (this._x<50) {
this._x = 50;
}
}
if (Key.isDown(87)) {
this._y -= 10;
if (this._y<50) {
this._y = 50;
}
}
if (Key.isDown(83)) {
this._y += 10;
if (this._y>655) {
this._y = 655;
}
}
if (this.hitTest(b1)) {
// chaosCopter_mc._y = 600;
// chaosCopter_mc._x = 500;
_root.score -= 1000;

}
arrowX = this._x;
arrowY = this._y;
if (Key.isDown(Key.ENTER)) {
chaosFire();
} else {
allowFire = 1;
}
}

var i:Number = 1;
function chaosFire() {
if (allowFire == 1) {
i += 1;
var newname = "chaosFire_mc"+i;
_root.attachMovie("chaosFire_mc", newname, i);
_root[newname]._y = _root.chaosCopter_mc._y+2;
_root[newname]._x = _root.chaosCopter_mc._x-19;
allowFire = 0;
_root[newname].onEnterFrame = function() {
var bullet_speed = 10;
this._y -= bullet_speed;
if (this._y<0) {
this.removeMovieClip();
} else {
if (this.hitTest(b1)) {
_root.score += 1000;
this.removeMovieClip();
}
}
}
}
}

b1.onEnterFrame = function(){
this._y += 4;
this._x += 1;

if (this._y > 850){
this._y = -15;
this._x = random(800);
}else{
if (this._x > 1100){
this._y = -15;
this._x = random(800);
}else{
if (this.hitTest(chaosCopter_mc)) {
}
}
}
}

As you can see, only one enemy. The bullets dissapear when they hit the enemy and 1000 points are added to a dynamic textfield. If the enemy hits the chaosCopter there's a 1000 point reduction.

Thanks in advance

//Henrik

Moving Enemies
I'm making a game and need to know how to make enemies enter the stage from random directions, and then move around the screen randomly aswell.

Regenerating Enemies
Hi there. I'm working on a simple shoot to kill game... but how do I...

1. Say, there's one enemy and I kill it. After it dies, I want another one of it to appear randomly in the screen.



Oh... and I'm planning on making games that involve collission detection (Like a mario game of some sort) any fine tutorials on the matter? Or even a sample game with source with tutorial? Thanks!

Enemies In Space Scroller
I am making a space scoller game and I need to know how to:

a) Make the enemies do complex movements like turns and loops,

b) Impose some sort of delay before the enemies come down, so I can organise the level into waves of enemies,

c) Make the enemies fire bullets at the playership (controlled via keyboard).

Please help if you can.

Create Enemies Function?
I'm creating a space-invaders like game, and I want to create a function (on the main timeline) which duplicates or creates new enemy objects. The code for the enemy is as follows


Code:
onClipEvent (load) {
this.mon_num = 1;
this.mon_ringtot = 6;
this.speed = 20;
this.ringwidth = 150;
gotoAndStop(2);
}
onClipEvent (enterFrame) {
//Circular motion
this._x = (_root.screenwidth/2)+Math.sin(((_root.clock/10000)/(1/(this.speed+_root.globalspeed)))+((this.mon_num/this.mon_ringtot)*(2*Math.PI)))*this.ringwidth;
this._y = (_root.screenheight/2)+Math.cos(((_root.clock/10000)/(1/(this.speed+_root.globalspeed)))+((this.mon_num/this.mon_ringtot)*(2*Math.PI)))*this.ringwidth;
//Rotation
myRadians = Math.atan2((_root.screenheight/2)-this._y, (_root.screenwidth/2)-this._x);
myDegrees = Math.round((myRadians*180/Math.PI));
this._rotation = myDegrees-90;
}
This enemy creation function would have to be able to:
1) Create mon_ringtot number of enemies
2) Set mon_num, mon_ringtot, speed, ringwidth, etc for each individual enemy.

How would I do this?

Generating 'Enemies' From The Top Of The Screen
Hi there guys; I have a Flash game that I'm working on at the moment that has progressed to the stage where I have a number of enemies appearing at the top of the screen as the game begins, slowly moving down to the 'Missile Line' (see screenshot, below) and then firing their missile, which currently travels in a vertical line down to the bottom of the screen.



I am having some problems at this stage, however, and with your help I was hoping I'd be able to solve some of these. My code is posted below, and underneath that are a number of problems I have identified which I was hoping to sort out. The code for the enemy generator is as follows:


Code:
//variable setup for later use
var hitLine = 150 //whatever the y position of you hitline is on the root timeline
var maxEnemies = 6
enemyArray = new Array
var hit = false
//
function enemies(){
for(var i=1; i<maxEnemies; i++){
var temp = _root.attachMovie("enemy_mc", "enemy_mc"+i, i)
// sets start positions
temp._x = random(Stage.width)
temp._y = 0 - (i*10)
temp.count = i
temp.ySpeed = i/6 //this is any number you fancy - having it dependent on i which is the 'depth' of the movieclip will make them gradually get faster
// sets bahaviour
temp.onEnterFrame = function(){
this.moveEnemies()
}
}
}
// calls the above enemies function
enemies()

MovieClip.prototype.moveEnemies = function(){
if(this._y<(Stage.height+this._height)){
this._y += this.ySpeed
if(this._y<hitLine-this.count || this._y>hitLine){
hit = false
} else {
hit = true
}
if(hit){
fireMissile(this)
// deleting the enemy here
}
} else {
delete this.onEnterFrame
}
}

var j = maxEnemies

function fireMissile(mc){
this.mc = mc
//trace(this.mc)
_root.j++
var Missile = _root.attachMovie("missile_mc", "missile_mc", j)
Missile._x = this.mc._x
Missile._y = this.mc._y
Missile.MissileSpeed = this.mc.ySpeed*3
Missile.onEnterFrame = function(){
this._y += this.MissileSpeed
}
}
I'd like each enemy to fade out as they reach the enemy line and fire their missile.
I tried adding new frames to the enemy timeline and then referencing these frames as they pass over the line, but ActionScript doesn't like this and it appears not to work. Just having them fade out nicely (and then deleted from the scene) would be fantastic.
There is also a problem at the moment in which as soon as a second bullet is generated, it will cause the first bullet to disappear. The same happens when a third or fourth bullet appears on the screen at the same time. How can I solve this?
I'm pretty sure this would be a simple line fix or something, but I can't see it. Can anyone point me in the right direction here? Cheers.
The missiles should move down to the player who will always be in the middle of the screen, and not vertically down, missing the player.
This one is less important at the moment, as I'd rather get the other stuff working first, but I would like the missiles to always hit the center of the bottom of the screen regardless of where they are fired from. Any ideas?

Thanks again guys, I'm pretty sure that I can sort these out with your help, so I look forward to getting some replies soon.

: )

Limiting Enemies In A Game
I working on a small flash game. I was using a the Enemies and collisions tutorial to build the basics of the game.

I am actually having 2 problems that I can't figure out how to fix. First of all, you are in a UFO and are flying over top of the "enemies". I have it set so that colliding does not hurt you. This seems to be creating a graphical error. The duplicate enemies have their graphics above the UFO. I have tried putting this code with the enemies, in its own control layer, with the character, and rearranging the layers, but the duplicates are always above the UFO, while the original goes under the UFO like I want. Is there a way to fix this?

My second problem is the one I need fixed, as it is more than a graphical problem. The game made with the tutorial has no end, unless you get a game over. I have my code set up to have no more than 2 enemies at a time. How do I set my game to stop respawning enimies after a set amount have been spawned? I am trying to end the level after 15 enemies.

[F8] Spawniing Enemies Off Stage
I need enemies to randomly spawn and then head towards an object. The thing is, I want them to spawn at random points around the screen but I don't want any to actually spawn on the stage. I tried using arrays for coordinates, but it would take a whole lot of coding to plot out 8 arrays needed and I figure there has to be a simpler way.

I also tried creating a do not spawn clip the size of the stage but that did not work too well either.

Any suggestions?

[CS3] Random Spawnig Enemies
Ok.. i am creating shooter game where you have to shoot enemies that are falling down.. How could i make those enemies spawnin randomly and then falling down normally.. ? i use 550 * 400 workingspace and enemies should spawn into this area.

Keep Enemies From Being Shot Behind Obstacles
if I'm using the hittest method - determining whether the cursor is over the enemy mc when the left mouse button is pressed (shooting), how do I prevent hittest from working whilst the enemy is behind an obstacle like a shape or graphic on a higher layer?

I know I could just tell the enemy mc to go to a frame that doesn't have the hittest code for the cursor while hittest with the obstacle is true, but there has to be a neater way - and one that would allow for the enemy to still be shot on any part of his body that is not hidden by the obstacle.

EDIT:

I suppose I could just put in an if condition that precedes my hit code, which wouldn't allow it to work unless the enemy was hidden, like this:


ActionScript Code:
//old code:
onClipEvent (mouseDown) {
    if (this.hitTest(_root._xmouse, _root._ymouse)) {
        _root.hits++;
        _root.speed = (random(3)+1);
        _root.displayText();
    }
}
//hypothetical code:
onClipEvent (mouseDown) {
    if (this.hitTest(_root._xmouse, _root._ymouse)) {
        if (this.hitTest(_root.obstacle)) {
            //do nothing
        } else {
            _root.hits++;
            _root.speed = (random(3)+1);
            _root.displayText();
        }
    }
}

but that still wouldn't allow the enemy to be shot if part of him is sticking out - which is kind of crucial because where he gets hit determines how much damage he takes

Generating 'Enemies' From The Top Of The Screen
Hi there guys; I have a Flash game that I'm working on at the moment that has progressed to the stage where I have a number of enemies appearing at the top of the screen as the game begins, slowly moving down to the 'Missile Line' (see screenshot, below) and then firing their missile, which currently travels in a vertical line down to the bottom of the screen.

Screenshot Of Stage

I am having some problems at this stage, however, and with your help I was hoping I'd be able to solve some of these. My code is posted below, and underneath that are a number of problems I have identified which I was hoping to sort out. The code for the enemy generator is as follows:


Code:
//variable setup for later use
var hitLine = 150 //whatever the y position of you hitline is on the root timeline
var maxEnemies = 6
enemyArray = new Array
var hit = false
//
function enemies(){
for(var i=1; i<maxEnemies; i++){
var temp = _root.attachMovie("enemy_mc", "enemy_mc"+i, i)
// sets start positions
temp._x = random(Stage.width)
temp._y = 0 - (i*10)
temp.count = i
temp.ySpeed = i/6 //this is any number you fancy - having it dependent on i which is the 'depth' of the movieclip will make them gradually get faster
// sets bahaviour
temp.onEnterFrame = function(){
this.moveEnemies()
}
}
}
// calls the above enemies function
enemies()

MovieClip.prototype.moveEnemies = function(){
if(this._y<(Stage.height+this._height)){
this._y += this.ySpeed
if(this._y<hitLine-this.count || this._y>hitLine){
hit = false
} else {
hit = true
}
if(hit){
fireMissile(this)
// deleting the enemy here
}
} else {
delete this.onEnterFrame
}
}

var j = maxEnemies

function fireMissile(mc){
this.mc = mc
//trace(this.mc)
_root.j++
var Missile = _root.attachMovie("missile_mc", "missile_mc", j)
Missile._x = this.mc._x
Missile._y = this.mc._y
Missile.MissileSpeed = this.mc.ySpeed*3
Missile.onEnterFrame = function(){
this._y += this.MissileSpeed
}
}
I'd like each enemy to fade out as they reach the enemy line and fire their missile.
I tried adding new frames to the enemy timeline and then referencing these frames as they pass over the line, but ActionScript doesn't like this and it appears not to work. Just having them fade out nicely (and then deleted from the scene) would be fantastic.
There is also a problem at the moment in which as soon as a second bullet is generated, it will cause the first bullet to disappear. The same happens when a third or fourth bullet appears on the screen at the same time. How can I solve this?
I'm pretty sure this would be a simple line fix or something, but I can't see it. Can anyone point me in the right direction here? Cheers.
The missiles should move down to the player who will always be in the middle of the screen, and not vertically down, missing the player.
This one is less important at the moment, as I'd rather get the other stuff working first, but I would like the missiles to always hit the center of the bottom of the screen regardless of where they are fired from. Any ideas?

Thanks again guys, I'm pretty sure that I can sort these out with your help, so I look forward to getting some replies soon.

: )

Using An Array To Hit Test Enemies
Hello, I'm making a game where enemies (beans in this case) generate off a timer and run across the screen. The aim is to hit them with a big fork to kill them (controlled by the keyboard).

The bean enemies are all instances of the same movie clip, so I added them to an array called beanGroup. When I hitTest with the code I have at the moment, it throws up a run time error:

Error #2007: Parameter hitTestObject must be non-null.

The idea was to place the instance names in an array, then access them through a hitTest. However, it is becoming problematic to reference the names from the array back to the actual instances that placed them there. Can anybody figure out what solution may be required?

The Code:
Please note: I have removed some of it to make it easier to read.

PHP Code:



var beanGroup:Array = new Array();
            var beanNumber:Number = 0;

            function addBean(event:TimerEvent):void
            {
            bean = new mcBean();
            addChild(bean);
            bean.name = "bean"+beanNumber;
            beanGroup.push("bean"+beanNumber);
            beanNumber++;
            }

            stage.addEventListener(KeyboardEvent.KEY_DOWN, moveFork);
            
            function moveFork(evt:KeyboardEvent):void
            {
                switch (evt.keyCode) {
                case Keyboard.DOWN :
                forkInstance.y += yFork;
                
                for ( var i:int = beanGroup.length -1; i >= 0; i--)
                {
                if(forkInstance.hitTestObject(beanGroup[i] as DisplayObject)){
                    trace ("bean killed");
                    }
                }


Efficient Way For Making Many Enemies
Hey, i'm working on a game right now where I want around 40 or so animated enemies on screen at a time. Is this even possible with flash? Right now i'm starting to get slowdown when I have 15 or so on screen and they're not even animated yet. This is how i'm doing it at the moment.

I'm using a setInterval function for my characters movement.







Attach Code

function createEnemy(enemyName, enemyPicture, xvar, yvar, eSpeed, range) {
this.createEmptyMovieClip(enemyName, this.getNextHighestDepth());

_root[enemyName].attachMovie(enemyPicture, "enemy"+enemyCounter, this.getNextHighestDepth());
_root[enemyName]._x = xvar;
_root[enemyName]._y = yvar;

enemyCounter++;

_root[enemyName].onEnterFrame = function() {
if (_root.player._x<_root[enemyName]._x-range) {
_root[enemyName]._x -= eSpeed;
}
if (_root.player._x>_root[enemyName]._x+range) {
_root[enemyName]._x += eSpeed;
}
if (_root.player._y<_root[enemyName]._y-range) {
_root[enemyName]._y -= eSpeed;
}
if (_root.player._y>_root[enemyName]._y+range) {
_root[enemyName]._y += eSpeed;
}
}
}

























Edited: 05/31/2007 at 01:57:53 PM by Gooms9

Removing Hit Enemies And Platforms
okay, at the moment, i'm trying to make a game, and i've accomplished a fair amount for being a n00b, alot of the tutorials here and really useful, but somethings have eluded me. For instance, though i found an awesome tutorial, and now have jumping and gravity, i lack the ability to create a platform, for which my character to jump upon. I also lack the ability to remove a movie clip from the scene, for when my character (BlackMageWalk) hits Enemy with a Lightening. Though I have no code for platforms that works, heres what i have so far for my enemy



onClipEvent (enterFrame) {
if (_root.Lightning, hitTest(_root.Enemy)) {
_root.EnemySound.play();
_root.Enemy.gotoAndPlay(2);
if (this = _alpha = 0) {

}
}
}


That return blankspace is where i've been trying a combination of removeMovieClip, and delete, but i can't seem to figure it out. any help with this would be appreciated

Generating 'Enemies' From The Top Of The Screen
Hi there guys; I have a Flash game that I'm working on at the moment that has progressed to the stage where I have a number of enemies appearing at the top of the screen as the game begins, slowly moving down to the 'Missile Line' (see screenshot, below) and then firing their missile, which currently travels in a vertical line down to the bottom of the screen.





I am having some problems at this stage, however, and with your help I was hoping I'd be able to solve some of these. My code is posted below, and underneath that are a number of problems I have identified which I was hoping to sort out. The code for the enemy generator is as follows:


Code:
//variable setup for later use
var hitLine = 150 //whatever the y position of you hitline is on the root timeline
var maxEnemies = 6
enemyArray = new Array
var hit = false
//
function enemies(){
for(var i=1; i<maxEnemies; i++){
var temp = _root.attachMovie("enemy_mc", "enemy_mc"+i, i)
// sets start positions
temp._x = random(Stage.width)
temp._y = 0 - (i*10)
temp.count = i
temp.ySpeed = i/6 //this is any number you fancy - having it dependent on i which is the 'depth' of the movieclip will make them gradually get faster
// sets bahaviour
temp.onEnterFrame = function(){
this.moveEnemies()
}
}
}
// calls the above enemies function
enemies()

MovieClip.prototype.moveEnemies = function(){
if(this._y<(Stage.height+this._height)){
this._y += this.ySpeed
if(this._y<hitLine-this.count || this._y>hitLine){
hit = false
} else {
hit = true
}
if(hit){
fireMissile(this)
// deleting the enemy here
}
} else {
delete this.onEnterFrame
}
}

var j = maxEnemies

function fireMissile(mc){
this.mc = mc
//trace(this.mc)
_root.j++
var Missile = _root.attachMovie("missile_mc", "missile_mc", j)
Missile._x = this.mc._x
Missile._y = this.mc._y
Missile.MissileSpeed = this.mc.ySpeed*3
Missile.onEnterFrame = function(){
this._y += this.MissileSpeed
}
}
I'd like each enemy to fade out as they reach the enemy line and fire their missile.
I tried adding new frames to the enemy timeline and then referencing these frames as they pass over the line, but ActionScript doesn't like this and it appears not to work. Just having them fade out nicely (and then deleted from the scene) would be fantastic.
There is also a problem at the moment in which as soon as a second bullet is generated, it will cause the first bullet to disappear. The same happens when a third or fourth bullet appears on the screen at the same time. How can I solve this?
I'm pretty sure this would be a simple line fix or something, but I can't see it. Can anyone point me in the right direction here? Cheers.
The missiles should move down to the player who will always be in the middle of the screen, and not vertically down, missing the player.
This one is less important at the moment, as I'd rather get the other stuff working first, but I would like the missiles to always hit the center of the bottom of the screen regardless of where they are fired from. Any ideas?
Thanks again guys, I'm pretty sure that I can sort these out with your help, so I look forward to getting some replies soon.

: )

Using An Array To Hit Test Enemies
Hello, I'm making a game where enemies (beans in this case) generate off a timer and run across the screen. The aim is to hit them with a big fork to kill them (controlled by the keyboard).

The bean enemies are all instances of the same movie clip, so I added them to an array called beanGroup. When I hitTest with the code I have at the moment, it throws up a run time error:

Error #2007: Parameter hitTestObject must be non-null.

The idea was to place the instance names in an array, then access them through a hitTest. However, it is becoming problematic to reference the names from the array back to the actual instances that placed them there. Can anybody figure out what solution may be required?

The Code:
Please note: I have removed some of it to make it easier to read.

PHP Code:



var beanGroup:Array = new Array();             var beanNumber:Number = 0;             function addBean(event:TimerEvent):void             {             bean = new mcBean();             addChild(bean);             bean.name = "bean"+beanNumber;             beanGroup.push("bean"+beanNumber);             beanNumber++;             }             stage.addEventListener(KeyboardEvent.KEY_DOWN, moveFork);                          function moveFork(evt:KeyboardEvent):void             {                 switch (evt.keyCode) {                 case Keyboard.DOWN :                 forkInstance.y += yFork;                                  for ( var i:int = beanGroup.length -1; i >= 0; i--)                 {                 if(forkInstance.hitTestObject(beanGroup[i] as DisplayObject)){                     trace ("bean killed");                     }                 } } 

Generating 'Enemies' From The Top Of The Screen
Hi there guys; I have a Flash game that I'm working on at the moment that has progressed to the stage where I have a number of enemies appearing at the top of the screen as the game begins, slowly moving down to the 'Missile Line' (see screenshot, below) and then firing their missile, which currently travels in a vertical line down to the bottom of the screen.



I am having some problems at this stage, however, and with your help I was hoping I'd be able to solve some of these. My code is posted below, and underneath that are a number of problems I have identified which I was hoping to sort out. The code for the enemy generator is as follows:


Code:
//variable setup for later use
var hitLine = 150 //whatever the y position of you hitline is on the root timeline
var maxEnemies = 6
enemyArray = new Array
var hit = false
//
function enemies(){
for(var i=1; i<maxEnemies; i++){
var temp = _root.attachMovie("enemy_mc", "enemy_mc"+i, i)
// sets start positions
temp._x = random(Stage.width)
temp._y = 0 - (i*10)
temp.count = i
temp.ySpeed = i/6 //this is any number you fancy - having it dependent on i which is the 'depth' of the movieclip will make them gradually get faster
// sets bahaviour
temp.onEnterFrame = function(){
this.moveEnemies()
}
}
}
// calls the above enemies function
enemies()

MovieClip.prototype.moveEnemies = function(){
if(this._y<(Stage.height+this._height)){
this._y += this.ySpeed
if(this._y<hitLine-this.count || this._y>hitLine){
hit = false
} else {
hit = true
}
if(hit){
fireMissile(this)
// deleting the enemy here
}
} else {
delete this.onEnterFrame
}
}

var j = maxEnemies

function fireMissile(mc){
this.mc = mc
//trace(this.mc)
_root.j++
var Missile = _root.attachMovie("missile_mc", "missile_mc", j)
Missile._x = this.mc._x
Missile._y = this.mc._y
Missile.MissileSpeed = this.mc.ySpeed*3
Missile.onEnterFrame = function(){
this._y += this.MissileSpeed
}
}
I'd like each enemy to fade out as they reach the enemy line and fire their missile.
I tried adding new frames to the enemy timeline and then referencing these frames as they pass over the line, but ActionScript doesn't like this and it appears not to work. Just having them fade out nicely (and then deleted from the scene) would be fantastic.
There is also a problem at the moment in which as soon as a second bullet is generated, it will cause the first bullet to disappear. The same happens when a third or fourth bullet appears on the screen at the same time. How can I solve this?
I'm pretty sure this would be a simple line fix or something, but I can't see it. Can anyone point me in the right direction here? Cheers.
The missiles should move down to the player who will always be in the middle of the screen, and not vertically down, missing the player.
This one is less important at the moment, as I'd rather get the other stuff working first, but I would like the missiles to always hit the center of the bottom of the screen regardless of where they are fired from. Any ideas?

Thanks again guys, I'm pretty sure that I can sort these out with your help, so I look forward to getting some replies soon.

: )

Help With Top Down Shooter Rotation, Enemies Fire
Hey there wonderful flashkit community,

this is my first post here, I'm currently making my first game in flash in the vein of classic arcade shooters like 1942, aerofighters, raiden etc....

I followed the tute on scrolling shooters here and now have an engine running a tiled background with a main ship (that shoots!) and enemy waves spawning from the top and moving downscreen.

my next step is to get some of the bad guys (either turrets or jets) shooting back at the players x,y position. and er, rotating

I followed the weapons 101 tute but I'm getting the feeling that I don't need something this complicated ( as it is intended to be for a game with mouse control, mine is keys)

now that I have the code from the 101 converted to follow the players ship it is behaving erraticly and not really tracking the players ship if its position is on the right(of the ship)

any ideas on how to easily understand the coding and trig involved here, so maybe I could rewrite this from scratch with a bit more insight to what I'm actually doing? I can post code if needed....

cheers,
Matt

[MX04] Multiple Hits On Enemies
Hi All

As i am quite a noob at Actionscripting i thought id ask you a question or 2.

1. Im making a space invaders kinda game and i want a simple code (nothing 6 million lines long please, unless its avoidable) that allows you to shoot an enemy several times befoer it is destroyed. Any help?

2. What is the code for making a ship move diagonally. Ive got up, left, down and right but cant seem to get a diagonal code working.

Any help people is appreciated

Thanks

AceyLi

[F5] Working On Spawning Enemies For A Game...
I am still working on that Asteroids game. I am having problems with the spawning; I was wondering if it was possible to make a duplicate of the enemy (Which is an asteroid) spawn every time your score hits a multiple of 2 (like 2, 4, 8, 16, 32, 64, etc.) I am not really sure how to do this, but I came here last week and asked and SilentWeed gave a bit of advice which helped me a bit. However, as of now an asteroid spawns on every even number.

Basically on 2, 4, 6, 8, 10, 12, etc an asteroid will spawn. It will appear and then erratically teleport all over the screen until it kills the player or you collect another point, at which point it moves normally. Then on the next even number, it teleports again. A third asteroid never spawns; its just this one duplicate porting all over the place on every even number. Being relatively new to ActionScript in general, and using AS1, it has been hard to find help with this. As of now, here is my code for the Asteroid, in case it helps. Please let me know if there is anything I am doing horribly wrong!




----------------------

//The following is a Function (named "go") that is defined here, to spawn the first asteroid. It should also run on the duplicate, just once//
onClipEvent (load) {
function go() {
this._x = random(800)+(_root.Ship+-(random(300(+50))));
this._x = random(800)+(_root.i+-(random(50)));
this._y = random(600)+(_root.Ship+-(random(300(+50))));
this._y = random(600)+(_root.i+-(random(50)));
this._rotation = random(360);
this._xscale = random(200)+100;
this._yscale = _xscale;
xSpeed = random(+2)+1;
ySpeed = random(-2)+1;
}
//the function "go" is actually run here//
go();
}
//here is what makes the asteroid move//
onClipEvent (enterFrame) {
this._x -= xSpeed;
this._y += ySpeed;
_x -= xSpeed;
_y += ySpeed;
this._rotation -= (3);
//here is the score definition. Its supposed to be "If the score is a multiple of 2, duplicate another instance of Asteroid." Something HERE is not right, though.//
if (_root.score%2 == 0 and _root.score != 0) {
duplicateMovieClip(this, "this"+a, a+300);
}
//makes it repeat on screen, if it goes off the border on the right it comes back on the left, etc. This is also on the ship//
if (_y<0) {
_y = 600;
}
if (_y>600) {
_y = 0;
}
if (_x<0) {
_x = 800;
}
if (_x>800) {
_x = 0;
}
//here is the collision detection, using "sentries", or blank MC's, to define the borders//
// for each sentry in this clip ("clip b") //
for (i in this.perim) {
// get the sentry's point on the stage//
this.perim.localToGlobal(p={x:this.perim[i]._x, y:this.perim[i]._y});
// see if it's touching o ("clip a")//
if (_root["Ship"].hitTest(p.x, p.y, true)) {
this.gotoAndStop(2);
_root["Ship"].gotoAndPlay(2);
}
}
}

[MX04] **Code For Enemies In A Shooter**
I am really close to getting my shooter to work but at the moment none of my enemies respond when they are shot (clicked on). I am using Flash MX 2004 and I would really appreciate it if someone could give me the necessary code to put on my enemies so they die when clicked on. Also please be specific about where the code goes, because I am VERY new to actionscript and flash.

I have a feeling the reason my enemies won't respond is because of other code in my game. That is why I was wondering if I could simply email someone my flash and they could look at it.

Nevertheless, Thanks in advance

Newbieian

Stuck While Checking For Enemies To Create
I use the following function to create an enemy if he doesn't already exist.
I launch this function on every onEnterFrame.
i = maximum amount of enemies
The code creates one enemy but gets stuck after that.
Any idea what is causing this problem?

Here the code:


Code:
// this function creates the enemie
function createEnemie(i)
{
for ( ii = 1; ii <= i ; ii ++ )
{
trace ("test");
if ( !enemie )
{
var enemie = attachMovie( "enemie_mc", "enemie", 4 );
positionEnemie( enemieFarSpawn, enemieCloseSpawn )
trace ("enemie spawned");
}
}
}
/update:

when I traced i and ii I get:

i = undefined
ii keeps counting higher and higher (probably 'coz i is undefined)


Code:
var numberOfEnemies = 1; // initial number of enemies

// this part is repeated everytime a new frame is entered
onEnterFrame = function()
{
createEnemie( numberOfEnemies );
}
/update: I found the solution to my problem! createEnemie() was called from another position without giving it a a value to i. This caused the i = undefined error...

[help] Duplicating Enemies (Venus Fly Traps)
Guys I have a real dilemma. In my game I have theses enemies that are like giant Venus fly traps. They work perfectly ( As well as I had hoped for) except as soon as I start to duplicate them they all attack, get hurt and die together.

The swf file

I am using a for loop but somewhere along the way it has gone to hell.
I have include in the swf the enemies health and a sword for a quicker dispatch.

What I need your help with is how to make them act individually.
Thx for any help that can be given.

This code is attached to the hero.



Code:
onClipEvent (load) {
var timeout = 0;
function movingDealDamage() {

for (i=1; i<21; i++) {
if (_root.hero_mc.legs.hitTest(_root.level1["Menemy"+i]["subject"+i]) || _root.hero_mc.body.hitTest(_root.level1["Menemy"+i]["subject"+i])) {
timeout = 30;
notme=true
if (_root.hero_mc.armour == true) {
_root.armourHealth -= _root.level1["Menemy"+i]["subject"+i].damage;
} else {
_root.health -= _root.level1["Menemy"+i]["subject"+i].damage;
}
}

}

}
//
//enemy takes damage due to hero weapon.
//
var timeout = 0;
function enemyTakesDamage() {

for (i=1; i<21; i++) {
if (_root.hero_mc.weapon.hitTest(_root.level1["Menemy"+i]["subject"+i])) {
timeout = 15;

enemyState = 3;
_root.level1["Menemy"+i]["subject"+i].Ehealth -= _root.hero_mc.weapon.attack;
}
}


}
var timeout = 0;
function sensor() {

for (i=1; i<21; i++) {
if (_root.hero_mc.hitTest(_root.level1["Menemy"+i]["sensor"+i])) {
timeout = 21;
notme=false
enemyState = 2;
} else {
enemyTakesDamage();
}

}


}

//
//play the enemies death animation
//
var timeout = 0;
function killEnemy() {

for (i=1; i<21; i++) {
if (_root.level1["Menemy"+i]["subject"+i].Ehealth<=0) {
enemyState = 4;
} else {
break;
}


}
}
}


onClipEvent (enterFrame) {

//I dont want the guy to take all the damage at once so every second or so is ehen the damage is recorded. this resets the timer

if (timeout>0) {
timeout--;
takenDamage = true;
} else {
dealDamage();
movingDealDamage();
sensor();
killEnemy();
enemyTakesDamage();
takenDamage = false;
}


// this ties the "state" to a frame in the enemy. each state plays a diffrent animation.
for (i=1; i<21; i++) {
_root.level1["Menemy"+i]["subject"+i].gotoAndStop(enemyState);


}

}

Infront of the fly trap is a box with an alpha of 1% called "sensor" . basically as soon as the hero touches it it plays the "attack animation".


I think thats all the relevent code. I hope someboyd can help me figue out where I have gone wrong.

Making Enemies Collide With Eachother
Hi, I've got a function here that spawns an enemy for me (thanks kglad) and I'm calling it in a loop every few seconds or so so that it creates a new enemy every second. This all works great. What I want to do though, is to make the enemies collide with each other. How would I go about doing this? I've tried using hitTest but it detects that each enemy is hitting itself which is always. I've attached my code.







Attach Code

enemyA = [];
var enemyCounter:Number = 0;

function createEnemy(cspeed, csprite, crange, clocx, clocy, cname)
{
//attaches the graphic for the enemy to the stage and sets all the variables
enemy = background.attachMovie([csprite], [cname], background.getNextHighestDepth()+50000, {_x:clocx, _y:clocy});
enemy.espeed = cspeed;
enemy.erange = crange;
enemy.cacheAsBitmap = true;
//adds the enemy to the array
enemyA.push(enemy);
enemyCounter++;

_root.onEnterFrame = function() {
//loops through the enemy array to see where each enemy is in relation to the
//player and if they are too far away //it moves them towards the players position

point={x:player._x,y:player._y};
background.globalToLocal(point);

for (var i = 0; i<enemyA.length; i++) {
if (point.x < enemyA[i]._x - enemyA[i].erange)
enemyA[i]._x -= (enemyA[i].espeed+Math.random()*2);
if (point.x > enemyA[i]._x + enemyA[i].erange)
enemyA[i]._x += (enemyA[i].espeed+Math.random()*2);
if (point.y < enemyA[i]._y - enemyA[i].erange)
enemyA[i]._y -= (enemyA[i].espeed+Math.random()*2);
if (point.y > enemyA[i]._y + enemyA[i].erange)
enemyA[i]._y += (enemyA[i].espeed+Math.random()*2);
}
}
}

Game Help. Add Enemies In AS3 With Joystick Controls
I'm using the basic version of the joystick ineractivity found here http://www.adobe.com/devnet/flash/samples/interactivity_3/index.html

i'm trying to add enemys that either fly through randomly or bounce through(whatever). and collide with the hero(beetle). so you have to avoid them and possibly collect things for points.
i made something very simliar in AS2 without the joystick, but i'm trying to figure it out here in AS3.
can anyone point me in the right direction, i would be much obliged?.

Game Help, Shooting Falling Enemies
i have a game, basically missles fall from above and you have to shoot them, over all it works, but there are a few small things i can't figure out:

1. when you shoot an enemy you get more than one point even though it is only coded to give 1 point.

2. when the enemies hit the ground, they are supposed to explode and subtract 1 life, but they don't explode right away, and they subtract like 6 lives.

3. they don't reset fast enough after being killed

4. you can move off of the screen

basic things like that, if anyone has time to look at it, and make suggestions, i would appriciate it greatly,

Thanks.

Shooting Game With Friendlies & Enemies
I found a simple shooting game where smiley faces come out from the right and the bullseye cursor will shoot them with a mouse click.

All that is great, except I have no idea how to insert good guys.

I have changed it so it now produces yellow smiley faces and red smiley faces. The original yellow ones still explode when you shoot them, but not the red ones. I have duplicated all the code in all places.

I don't want someone to pick apart the code and tell me what's wrong, though that could be a last resort. What I am really looking for is a tutorial about a shooting game that has GGs and BGs in it. All the tutorials I have found are just the "shoot everything" style.

Any help would be appreciated.

P.S. I have already used the site www.PleaseUseGoogle.com and it's not so friendly sister site, but no luck.

Game Help, Shooting Falling Enemies
i have a game, basically missles fall from above and you have to shoot them, over all it works, but there are a few small things i can't figure out:

1. when you shoot an enemy you get more than one point even though it is only coded to give 1 point.

2. when the enemies hit the ground, they are supposed to explode and subtract 1 life, but they don't explode right away, and they subtract like 6 lives.

3. they don't reset fast enough after being killed

4. you can move off of the screen

basic things like that, if anyone has time to look at it, and make suggestions, i would appriciate it greatly,

Thanks.

Killing Multiple Enemies And Moving Frames
I have a game I'm making, not online or anything, and I only know how to do it so when one enemy is killed it goes to the next screen, how would i do it so if all the enemies were dead it would move frames. I might figure it out because i have been experimenting with if statements and crap. Thanks

Shooting Game, Making Enemies Dissapear
Right, I'm making a shooting game where enemies just appear on the screen from behind obstacles, and the player has to shoot as many of them as he/she can before the game finishes.

The problem I'm having is making the enemies dissapear when the player shoots it.

I've tried a lot of methods, but I'm still having problems with it.

The stage will usually contain about five layers, a background one, two to three enemy layers, and a foreground layer.

The enemy layers will contain instances of the enemy symbol. I am using the same enemy symbol multiple times, on the stage at the same time usually.

To make it as simple as possible, I want to be able to make individual instances of a button/movieclip dissapear when I click on one.

If you don't understand what I'm asking, please reply and I'll try to create a small demo in flash of what it is that I want.

Thanks for any help.

[MX04] Making Enemies In A Platform Game HELP
ok so i have a pretty good start a platform game. but before i start creating the whole first level i want to know how i can add in some enemies and i want to know if i can make it sorta like mario and jump on their heads. if not thats fine i can deal with a simple shooting them, thats fine.

i will attach my .fla so you guys can take a look
i have not created a enemy MC yet but i will soon
he will be called "monster"

but here is my code so far:

PHP Code:




onClipEvent(KeyUp){
    gotoAndStop(1);
}
                

onClipEvent (load) {
    speed = 7;
    isJumping = false;
    isFalling = false;
    gravity = 7;
    jumpAmt = 12;
    gotoAndStop(1)
}
onClipEvent (enterFrame) {
    if (Key.isDown(Key.RIGHT)) {
        _root.ground._x -= speed;
        _root.bg._x -= speed;
        Play();
        setProperty ("_root.char", _xscale, 100);
    } else if (Key.isDown(Key.LEFT)) {
        _root.ground._x += speed;
        _root.bg._x += speed;
        Play();
        setProperty ("_root.char", _xscale, -100);
    }
    if (_root.ground.hitTest(this._x, this._y, true)) {
        if (!isJumping) {
            jumpAmt = 12;
        }
        if (Key.isDown(Key.SPACE) && !isJumping) {
            isJumping = true;
        }
    } else {
        if (isJumping && jumpAmt <= 1) {
            isJumping = false;
            isFalling = true;
            _y += gravity;
        } else if (!isJumping) {
            isFalling = true;
            _y += gravity;
        }
    }
    if (isJumping) {
        _y -= jumpAmt;
        jumpAmt -= 0.5;
    }
}







thanks for any help in advance

Enemies Of AS; Auto Kern, Letter Spacing
It took me 1 day of testing to figure out why my script wont work!
Then figured out that the dynamic text I m willing to show (that comes from input form) has has auto kern and letter spacing activated!! preventing my script to bug! (I created a routin which checks if the user fills the form, outputs an error message if he didn't fill, and, validates the script if filled)
I posted this just to save the time for others facing the same probleme. hoping thers will be a solution to this in future AS releases.

Making My Enemies Drop Bombs In Space Invaders
Hi all,

I'm in the process of learning flash just now and am completing an online tutorial on Space Invaders. Thing is, the bombs drop from a random location on the screen. I want them to drop from a random enemy (I'm not too bothered just now about making it one on the bottom row or one with no other enemies before them).

At the moment, here is the AS that makes them drop (the frequency is determined elsewhere):

eval("_root.alienBomb" + alienBombNum)._x =random(700);
eval("_root.alienBomb" + alienBombNum)._y = 300*Math.random();

An I can modify it to get a certain one to drop:

eval("_root.alienBomb" + alienBombNum)._x =_root.alienClip2_2._x;
eval("_root.alienBomb" + alienBombNum)._y = _root.alienClip2_2._y;

I can' t get it to randomly choose one - I know I have to use the random function, but don't know how to implement this.

Can anyone help?

regards,

g

Major Slowdown From Multiple Enemies In Game.. (hitTestPoint?)
I'm trying to create a game involving enemies that spawn from the ceiling and fall onto platforms. From their they walk to the end of their platform and fall, and then turn around, repeating the process. This involves a few for loops (some double), and hitTestPoint tests.

There is about 70 platforms on screen to which each enemy is being collision checked against at all times. I realize this is a lot, but I didn't think it would be near enough to slow the game down completely.

As a test, my code currently spawns 30 enemies onscreen, which is a lot but isn't too unrealistic in comparison to what I need. Once at least 3 enemies get on screen, things start to slow down a lot. Especially when an enemy is in freefall (which is weird considering I believe that is when less calculations occur).

I have posted example code, and attached the project itself for more detail.

I keep getting too discouraged when I encounter problems like this and stop my projects.. so I hope this is easy to resolve.


Code:
public function tick(event:TimerEvent){
var i:int;

for(i=0;i<enemyList.length;i++){
//trace(enemyList[i].vy+" "+enemyList[i].vx);
enemyList[i].vy+=gravity;

if(enemyList[i].onGround){
if( Math.floor((enemyList[i].y-(enemyList[i].height/2)) / gridSize) % 2 == 0) enemyList[i].direction=1;
else enemyList[i].direction=-1;
enemyList[i].walk();
}
else enemyList[i].falling();

var collision=enemyCollisionFloor(enemyList[i]);
if(collision != -1){
//trace(collision);
enemyList[i].y = collision;
enemyList[i].vy=0;
}
if(enemyList[i].vy==0) enemyList[i].onGround=true;
else enemyList[i].onGround=false;

enemyList[i].applyFriction(0.8);
enemyList[i].updatePos();
}
}

...

public function enemyCollisionFloor(enemy:Enemy):int{
var i:int;
var p:int;
var r:int;
for(i=0;i<groundList.length;i++){
for(p=1;p<=enemy.vy;p++)
//for(r=0;r<enemy.width;r++)
if(groundList[i].hitBox.hitTestPoint(enemy.x+enemy.vx,enemy.y+p,false) ||
groundList[i].hitBox.hitTestPoint(enemy.x+(enemy.width/2)+enemy.vx,enemy.y+p,false) ||
groundList[i].hitBox.hitTestPoint(enemy.x+(enemy.width)+enemy.vx,enemy.y+p,false)){
//trace("hitbox y: "+(groundList[i].y+groundList[i].hitBox.y)+" vy: "+vy+" enemy y: "+enemy.y+" collision y: "+(enemy.y+p));
return groundList[i].y+groundList[i].hitBox.y;
}
}
return -1;
}

Problems With Checking Weapon Fire Against Enemies In Flash Game.
So I am trying to get my blaster movie clips to hitTest correctly against my enemy movie clips.

When I press the space bar, I run this code from my player movie clip:
blastCount++;
_root.blast.duplicateMovieClip("blast"+blastCount, blastCount);
_root["blast"+blastCount]._visible = true;

This will attach my blast movie clip, which has it's own movement information, and thus zips across the screen just f ine.

I am also creating enemy movie clips at random y positions with the following code:
viruscount++;
_root.virus.duplicateMovieClip("virus"+viruscount, viruscount);
_root["virus"+viruscount]._visible = true;

These of course have their own movement info, and work just fine as well.

The problem comes when I want to hitTest these two objects against one another. I am constantly adding more blasts and more enemies, so I'm not exactly sure how I can test these against each other given that there isn't just 2 objects, but many of them, with varying names (blast1, virus7, etc). I was thinking about using some sort of array to store names and check against each other, but when I use a nested for loop to check through 2 arrays, it will eventually slow to a crawl because the arrays are constantly getting bigger.

Any help would be greatly appreciated!

Making A First-person Shooter: How To "pop-up" Enemies?
Greetings All!

A coworker of mine will retire in a few months. As a way of having a bit of fun with him, I thought it'd be great if I could build a first-person shooter game with Flash... as if he came back after retirement and went "postal" !

(Yeah, it's a bit gruesome, but this guy is a grumpy old crumudgeon, so we'd be poking fun at his temper a bit.)

I thought I could take actual interior photos around here for
backgrounds... and I could turn the stock employee photos that
are "out there" on our network and make them the targets.

So, I've been reading various tutorials and trying things...
in-between my regular duties.

What I'd like to do is have my targets / victims "pop up"
randomly. But the only tutorials I'm finding that discuss this
usually talk about making a separate object... such as a trash
can... and putting it in a "higher layer" on the background, then
putting your randomly generated target-person-image behind it...
and then turn that image into a movie clip that slowly moves up
the stage to reveal itself.

I really don't want to throw other objects into the picture. I
thought perhaps there would be some way to create the target
movie clip so that it slowly reveals itself onto the stage ??

I originally hit upon this idea when I stumbled onto a game that's in the "Full source" subcategory in the game section. (However, the download does NOT seem to have ANY source code in it, from what I can tell.) It's the "chaingun" game:

http://www.flashkit.com/movies/Games...1175/index.php

I tried posting on that developer's blog well over a week ago, asking for the full source. I haven't heard anything back yet.


Thanks!

-= Dave =-

Multiple Bullets, Multiple Enemies, Collision
I have a game where the user can shoot up to 15 bullets at a time on the screen. Each bullet is a new object created by attachMovie. I also have an unknown number of enemy types which will be determined depending on the level. Now, my question is, is there any way to just determine if a bullet hit SOMETHING, not a specific object? Like some kind of event, onHitSomething(){return the object that it hit}. Basically I just want to know if the bullet is overlapping something, and if it is, tell me what its overlapping. This would be very helpful because then i could use this one function no matter what it hit, and depending on what it hit, take appropriate action. Any ideas??? Thanks ahead of time!

HitTest To "multiple" Enemies
In my scene I have more than 1 enemy. and put a few script for the char like that.

if(_root.char.Thumb.hitTest(_root.enemy)){
//then attack
}

So the char can hit the enemies and decrease their lifetime.
But when I put the instance name enemy to all enemies. Only 1 enemy can work. The other doesnt work.

Should I create a array for it? Or any better way to do that?



I tried to use array like that, but it doesnt work

onClipEvent (enterFrame) {
if(keyIsDown(36)){
enemy_array = new Array();
for (i=0; i<2; i++){
if(_root.char.Thumb.hitTest(_root.enemy_array[i])){
//then attack
}
}
}

Should I suppose to put enemy instance name to enemy_array[1]

Copyright © 2005-08 www.BigResource.com, All rights reserved