Hello All,
I'm trying for the first time in my game to work on a smarter enemy than my basic one.
The idea of making a Machine State make sense to me so the enemy can change his state and animation from one to another.
So far so good, But since there are many ways to do so I have the feeling I will go lost very soon and will have issues even that I'm very organized in my event sheets, so I would like to ask you if my idea is more complex than it should be or not.
My Enemy actions, states I will need to play with including animations:
- IDLE (stop)
- PATROL (wander, until sight of view is overlapping the Player then change to "ALERT" state)
- ALERT(stop, when "Ready to Jump" animation is finished: change to "JUMP" state)
- JUMP (Simulate JUMP, change to "ON_AIR" state)
- ON_AIR (2 frames loopable as long as the enemy is on JUMP or FALL, not on floor)
- LAND (stop for a second) change to "IDLE" state) and loop the all state machine again and again..
Inside my head it works great, but I know it will have issues since I never done that in C3 yet.
First, I'll make the state machine I'll use strings on instance variables for the enemy.
Questions:
1. Do you think this should be done using GROUPS, each group will contain the actions I described above using enable/disable all but one at the time? because I rather have this all thing very organized so I can follow.
2. From your experience: Do you have any suggestions to make it work with no issues I may ran into?
Thanks ahead!