A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: AS2 Game making!!!

  1. #1
    Junior Member
    Join Date
    Feb 2010
    Posts
    4

    AS2 Game making!!!

    I am fairly new to actionscript and I swear I got this to work before but it isn't and i'm losing patience with it. I have been around several websites looking for a way of making an infinite number of enemies appear on screen in little chunks. Say I have an enemy who is moving along the screen and i would like 4 others moving with him. But, when one of them is killed, another enemy appears for me to hit. How would i do it?!

  2. #2
    Junior Member
    Join Date
    Feb 2010
    Posts
    19
    All you need to do is attatch an enemy to the explode function of your ship. for example, for my game I would do this in my enemy ship explode function.
    PHP Code:
    function explode(){
    var 
    explosion _root.attachMovie("RedExplode","RedExplode" _root.getNextHighestDepth(),_root.getNextHighestDepth());
        
    explosion.speed speed;
        
    explosion._x _x;
        
    explosion._y _y;
        
    this.removeMovieClip();
    var 
    enemy _root.attachMovie("EnemyShip""EnemyShip" _root.getNextHighestDepth(), _root.getNextHighestDepth());//This would make it so that a new enemy came in place of my old one. 
    Thats how i would do it, but I cant say that there isnt a better way, because im sure there is.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center