# Enemy AI

**URL:** <https://forum.kirupa.com/t/enemy-ai/214375>\
**Category:** Uncategorized\
**Created:** [January 28, 2007, 3:50am UTC](https://forum.kirupa.com/t/enemy-ai/214375 "2007-01-28T03:50:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dhryn](https://avatars.discourse-cdn.com/v4/letter/d/47e85d/32.png) [@Dhryn](https://forum.kirupa.com/u/Dhryn)\
**Post date:** [January 28, 2007, 3:50am UTC](https://forum.kirupa.com/t/enemy-ai/214375/1 "2007-01-28T03:50:42Z")

</div>

I wanted to make several different types of AI for enemies on my game, and I wanted to store them in an array so that I can call them when needed easily from the same function.

Is there anyway that I can store and use them from an array. I have tryed this but nothing has happened. This is what I tryed.  
[AS]  
array = [func1(),func2(),func3()];  
function makeEnemy(){  
//enemy code  
array1;  
}  
function func1(){  
trace(“running function 1”);  
}  
function func2(){  
trace(“running function 2”);  
}  
function func3(){  
trace(“running function 3”);  
}  
[/AS]

Any help with this would be great.

Dhryn
