Question:

Actionscript 2.0, bullets

by  |  earlier

0 LIKES UnLike

how would i make a bullet zoom thru the screen randomy? ie my enemy shoots a bullet straight every 5 or so seconds, thanks

 Tags:

   Report

1 ANSWERS


  1. Try editing this script.  Place it on an MC to see what it does, then edit it.

    onClipEvent(load)

    {

       function reset()

       {

       if(this._name=="face")

       {

       this._visible=false;

       }

       else

       {

       this._visible=true;

       }

       this.dead=0;

       this.speed=random(3)+1;

       this._y=500;

       this._x=random(450);

       }

       this.reset();

      



    }

    onClipEvent(enterFrame)

    {

    this._y-=this.speed;

    if(this._y<-50)

    {

    this.reset();

    }

    }

    What's with the jumping up and down?  Do you mean in animation or game creation?

    If it's animation you could try using Motion Guides (but that is a form of motion tween).  If it is in game creation try searching http://www.tutorialized.com/ for tutorials on 'platform games'.

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.