Skip to main content
spelling, tried to make things clearer
Source Link
bummzack
  • 22.7k
  • 5
  • 64
  • 87

Implementing AS 2.0 witha FSM with ActionScript 2 without using classes?

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.

Implementing AS 2.0 with FSM?

i have seen many of references of AI and FSM like : http://www.richardlord.net/blog/fini...n-actionscript

and sadly im still can't understand the point of the FSM on AS2.0 is it a must to create a class of each state  ?

i have a project of game and also it has an AI, the AI has 3 state n i said the state is distanceCheck, ChaseTarget, and Hit the target,

the game that i create is FPS game and play via by mouse

so what i mean is i have create an AI ( and is success ) but i want to convert it to FSM method  ...

i create : function of CheckDistanceState() and in that function i have to locked the target with an array, and sort it with the nearest distance and locked it and it trigger the function ChaseState(), and in the ChaseState() i insert the Hit() function to destroy the enemy,

the 3 function that i created , i call it in the AI_cursor.onEnterframe, ( FPS game that only have a cursor in stage )

is there any chance to implement FSM to my code without to create a class ?? from what i read before  , to create a class mean to create an external code outside of the frame ( i used to code in frame) and i stil dont understand about it.

sorry if my explaination not clear ...

Implementing a FSM with ActionScript 2 without using classes?

I have seen several references of A.I. and FSM, but sadly I still can't understand the point of an FSM in AS2.0. Is it a must to create a class for each state?

I have a game-project which also it has an A.I., the A.I. has 3 states: distanceCheck, ChaseTarget, and Hit the target.

It's an FPS game and played via mouse.

I have created the A.I. successfully, but I want to convert it to FSM method...

My first state is CheckDistanceState() and in that function I look for the nearest target and trigger the function ChaseState(), there I insert the Hit() function to destroy the enemy,

The 3 functions that I created are being called in AI_cursor.onEnterframe.

Is there any chance to implement an FSM without the need to create a class? From what I've read before, you have to create a class. I prefer to write the code on frames in flash and I still don't understand how to have external classes.

edited tags
Link
Source Link

Implementing AS 2.0 with FSM?

i have seen many of references of AI and FSM like : http://www.richardlord.net/blog/fini...n-actionscript

and sadly im still can't understand the point of the FSM on AS2.0 is it a must to create a class of each state ?

i have a project of game and also it has an AI, the AI has 3 state n i said the state is distanceCheck, ChaseTarget, and Hit the target,

the game that i create is FPS game and play via by mouse

so what i mean is i have create an AI ( and is success ) but i want to convert it to FSM method ...

i create : function of CheckDistanceState() and in that function i have to locked the target with an array, and sort it with the nearest distance and locked it and it trigger the function ChaseState(), and in the ChaseState() i insert the Hit() function to destroy the enemy,

the 3 function that i created , i call it in the AI_cursor.onEnterframe, ( FPS game that only have a cursor in stage )

is there any chance to implement FSM to my code without to create a class ?? from what i read before , to create a class mean to create an external code outside of the frame ( i used to code in frame) and i stil dont understand about it.

sorry if my explaination not clear ...