iI have seen many ofseveral references of AIA.I. and FSM like :, http://www.richardlord.net/blog/fini...n-actionscript
andbut sadly imI still can't understand the point of thean FSM onin AS2.0. isIs it a must to create a class offor each state ?
iI have a project of game and-project which also it has an AIA.I., the AIA.I. has 3 state n i said the state is distanceCheckstates: distanceCheck, ChaseTargetChaseTarget, and Hit the target,Hit the target.
the game that i create isIt's an FPS game and playplayed via by mouse.
so what i mean is iI have create an AI ( and is success )created the A.I. successfully, but iI want to convert it to FSM method ...
i createMy first state is :
function of CheckDistanceState()CheckDistanceState() and in that function i have to locked the target with an array, and sort it withI look for the nearest distance and locked ittarget and it trigger the function ChaseState()ChaseState(), and in the ChaseState() ithere I insert the Hit()Hit() function to destroy the enemy,
theThe 3 functionfunctions that iI created , i call it in the AI_cursor.onEnterframe, ( FPS game that only have a cursorare being called in stage )AI_cursor.onEnterframe.
isIs there any chance to implement an FSM to my code without the need to create a class ?? fromFrom what iI've read before , you have to create a class mean. I prefer to create an external code outside ofwrite the frame ( i used to code on frames in frame)flash and i stil dontI still don't understand about it.
sorry if my explaination not clear ..how to have external classes.