Coding "Enemies"

From ManWiki

Jump to: navigation, search

Contents

Topic Summary: In this topic you will learn how to program your "enemies" to make them move on their own or chase your player.


Prerequisites Needed

Topic Assignments

Learn how to make your "enemy" follow your mouse.

Learn how enemies with AI (artificial intelligence) were made in this Platform Game tutorial. Download the source code (FLA) file of the Platform Game explained in the tutorial.

Watch these clips on Flash AI. Top is part 1 and Bottom is part 2.



Explore the MyGLife.org custom tutorial Flycatcher and look in the .FLA for examples of enemy AI ActionScript.

  • Look in the main timeline for the ActionScript layer.
  • Also examine the fly movie clips for additional ActionScript.
  • Look at line 12 and lines 58 through 64 in frame 5 of the main timeline "script" Layer.


Update the Wiki:

  • Upload the assets (.SWF and .FLA) you create to your Wiki project page.


Update the Blog:

  • Write a Blog post about this topic, share your learning experience!


Related Links and Tutorials


Search the Web for more information

Here are some search results on Flash ActionScript programming:


Image:Icons-mini-icon_user.gifImage:Icons-mini-icon_user.gifImage:Icons-mini-icon_user.gif Students Contributions

Personal tools