You should make an array for your characters properties, or enemies - depending on how you handle it (sometimes I use the enemy handling for players as well). Maybe a typed array, assuming you have 64 enemies...
Type enemytype
X# Y# Z#
XS# YS# ZS#
Direction#
Smarts
Object
Mode
Endtype
Dim enemy(64) as enemytype
Now most of that might not be necessary, it's just the way I do things, the part that your interested in is the Smarts component of the enemy type. For each character, you could set this when spawning an enemy. For instance, you might do something like this:
Function spawn_enemy()
e=0
while enemy(e).mode=0 and e<64 : inc e : endwhile
mesh=rnd(2)+1
if mesh=1 then enemy(e).Smarts=0
if mesh=2 then enemy(e).Smarts=1
if mesh=3 then enemy(e).Smarts=2
enemy(e).mode=1
Endfunction
Then you would call spawn)enemy, and store the Smarts of that enemy, which can be checked when updating the enemy, maybe even use it as a factor in AI, like the speed at which an enemy can move, or turn, or a randomised factor for whether or not they attack.

Health, Ammo, and bacon and eggs!
