Menu

Making Enemies shoot

2004-10-17
2012-12-25
  • Nobody/Anonymous

    I am making a top down flying game with the SGDK what i am wondering is how to you make the enemies shoot. Is there a script for them or is it a special function?

     
    • Ed

      Ed - 2004-10-18

      This was a topic on the message board very recently.  You could try doing a search on it.  But since you asked, I made a tutorial from my original response, which can be found here:

      https://sourceforge.net/docman/display_doc.php?docid=25179&group_id=9970

       
    • Nobody/Anonymous

      There is 1 way of making enemies shoot without script that i am aware of...

      *Create a Sprite called "TRIGGER" that starts relatively close to your ENEMY sprite(s).
      *Set TRIGGER's speed to 10, Intertia to 100, and set its motion to (Move towards ENEMY sprite)
      *Create a sprite Called "ENEMYBULLET"
      *Create a function called "ENEMYFIRE" that will create ENEMYBULLET sprite.
      *Set ENEMYBULLET's motion to (Move towards Player Sprite)
      *Create a collision between ENEMY sprite and TRIGGER that will activate ENEMYFIRE function.

      END RESULT: When the TRIGGER sprite collides with the ENEMY sprite, it will create the sprite BULLET, which is set to move towards your Player Sprite.

      -sCaReCrOw

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.