You should learn about state machines (simple) or behaviour trees (not as easy as state machines) for handling player and AI states. That way, you can avoid or atleast reduce the nested mess of many if conditions. They also help remove the need to figure out what the AI is doing based on all of the AI variables because, by being in the state, you implicitly know what it's doing.
Users browsing this thread: 7 Guest(s)
Non-Named (More debugging)
|
« Next Oldest | Next Newest »
|