The problem is in the zombieXai methods. You step through each zombie using indexes and comparing zombie to zombie+1. This works fine until you get to either an empty item in the list (item 6 = none) or you get to the last item where you are trying to compare the last zombie to the last zombie +1, which doesn't exist.
Usually either you would not use the last element or you would compare it to the first one at index zero. The index 0 alternative involves using modular arithmetic which is not directly available in Alice but can be simulated.
The major suggestion I would make is to get rid of your zombie ids and different methods and events for each zombie and use the list functions.
In a mouse clicked event you can call a method and pass it the "object under the cursor" then use this object to each one in the list until you find the matching one. Also you can get rid of zombieMaximum by using the length of the list if you need to know the number of items in the zombie list. WARNING: remove item 6 from you list, or make it a zombie.
Finally, you can get rid of the zombiesAlive list. This can be done by simply removing dead zombies from the list and checking for a length of 0.
So you would be going for something like:
Code:
event
if the mouse is clicked on anything call zombieAi with the item under the cursor.
ZombieAI curZombie
For all in zombieArray one zombie at a time
if(curZombie == zombie) then
do your stuff here.
else
do nothing