Free ActionScript

Flash AS2 & AS3 Tutorials, Game Code, Effects, Source Files & Sample Downloads

Game Enemy AI – Run Away from Player

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

Game Navigation Engine – Player movement

Game Navigation Engine Features

  • 4 directional player movement
  • Multi key press detection
  • Player rotation
  • Acceleration/deceleration

Preview

Download Fla Sample

Download Fla Sample