代码改变世界

ia与机游

2010-01-31 15:35  宝宝合凤凰  阅读(198)  评论(0编辑  收藏  举报

You are reading AS3 Flash Games for Beginners Read more from this series of articles.

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

 

 

Enemy AI

Enemy Behavior - Run Away & Follow Player

Thursday, April 9th, 2009 | Enemy AI, Game Examples AS2 | 27 Comments

Make your enemies alive! This Flash ActionScript 2 game enemy AI script shows you how to add different enemy behavior to multiple enemies.

Each behavior is easily customizable; you can change movement speed, turn speed, aggression range & enemy graphic for each type of enemy.

Download Fla Sample

Download Fla Sample

Tags: ActionScript Enemy AI, actionscript game engine, AS2 Enemy Movement, create multiple enemies, enemies actino script, enemy ai for flash, Enemy AI in Flash, Flash AS2 Game Scripts, Flash Game AI, follow player script, game enemy behavior, make enemies follow player, Making Smart Enemies in Flash, run away from player

Random Movement & Random Direction Change

Sunday, January 11th, 2009 | Enemy AI, Game Examples AS2 | 1 Comment

Here is an ActionScript 2 enemy ai script that allows you to create enemies that move around randomly inside a container movieclip and randomly change direction.

Preview

Download Fla Sample

Download Fla Sample

Tags: ActionScript Enemy AI, AS2 Enemy Movement, AS2 Enemy Script, Enemy AI in Flash, enemy creation as2, Enemy Random Movement, Flash Enemy AI, Flash Game AI, Game Enemy AI, Random Direction Change, Random Movement, Random Movement & Random Direction Change, space shooter actionscript

Game Enemy AI - Run Away from Player

Wednesday, January 7th, 2009 | Enemy AI, Game Examples AS2 | No Comments

Flash ActionScript 2 game enemy AI. This script gives your enemies the ability to run away from the player.

Download Fla Sample

Download Fla Sample

Customizable Enemy Settings

  • movement speed
  • turn rate
  • aggression range

Update
Check out the updated version of this script that incorporates different enemy behaviors in to one function, as well as creating multiple enemies at the same time: Enemy Behavior - Run Away & Follow Player

Tags: AS enemy script, as2, AS2 Enemy Movement, AS2 Enemy Script, Enemy AI, enemy ai for flash, Enemy Movement in Flash, Flash Game AI, how to make smart enemies in Flash, make enemy run away from player, Make Flash Game Enemy, making enemies move in ActionScript, making enemies move in flash, space shooter actionscript

Simple Enemy Random Movement

Sunday, December 14th, 2008 | Enemy AI, Game Examples AS2 | No Comments

Here is a simple AS2 enemy creation/ai script that allows you to create enemies that move about randomly inside a container movieclip. You can set custom movement boundaries/borders. When an enemy hits the border, it will “bounce off” and move in the opposite direction.

Random Movement Example

Download Fla Sample

Download Fla Sample

Tags: ActionScript, ActionScript Enemy AI, actionscript game engine, actionsctipt game libarary, AS enemy script, AS game example, AS2 Enemy Script, AS2 Movement Code, Create Simple Enemies in ActionScript, Create Smart Enemy in Flash, Creating Simple Enemies in Flash, enemy ai for flash, Enemy Random Movement, Flash AS2 Game Scripts, Flash Game Example, free flash game source files, Simple Enemy, Simple Random Movement

Game Enemy AI - Follow Player

Saturday, October 25th, 2008 | Enemy AI, Game Examples AS2 | 2 Comments

Flash ActionScript 2 game enemy AI. This script gives your enemies the ability to follow the player.

Download Fla Sample

Download Fla Sample

Customizable Enemy Settings

  • movement speed
  • turn rate
  • aggression range

Update
Check out the updated version of this script that incorporates different enemy behaviors in to one function, as well as creating multiple enemies at the same time: Enemy Behavior - Run Away & Follow Player

Tags: ActionScript Enemy AI, actionscript game engine, AS2 Enemy Movement, enemies actino script, enemy ai for flash, Enemy AI in Flash, Flash AS2 Game Scripts, Flash Game AI, make enemies follow player, Making Smart Enemies in Flash

Game Enemy AI - Random Enemy Movement

Saturday, August 30th, 2008 | Enemy AI, Game Examples AS2 | No Comments

Flash ActionScript 2 game enemy AI. This game engine creates a preset amount of enemies, gives enemies stats, and makes them move around randomly.  AS2 code example available for download below.

You can set enemy behavior like:

  • Roam Speed - Speed at which the enemy travels
  • Roam Time - How long to move before changing direction
  • Roam Distance - How many pixels to travel

Also check out the Game Enemy AI - Follow Player script.

ActionScript Enemy AI Example

Download Fla Sample

Download Fla Sample