A little proof of concept:
The AI system is now fully functioning...it just doesn't support many functions and data sources right now. One function I've added, seen in the AI text file as "!0", prints the parameter given to it. It will print to the AI output textbox in the final version, for now it prints to debug output in VS. The number preceding the ":" is basically a tick indicator for the AI timer. The reason it's random is internal, not really important.
You can see the parameters actually contain game data sources $4 and $5 which corresponds to the players aim vector. I also have player x, y, and z as sources right now.
By looking at the debug output, you can see it prints two numbers per tick. That's because the highest priority TaskNode, PRINT_X, is concurrent (*) and so the next highest priority gets executed after. If I removed the "*" then only the task with priority [1.0] would get executed.
Basically I just need to keep adding data sources and functions now to get this really cookin'. You'll eventually set up priorities based on distance to enemies and such for deciding what method of attack the bot uses for example. Another task might be capturing the enemy flag, but the priority of this task depends on a few things (don't want to concern the bot with capturing when its in the middle of a firefight). Capturing the flag could have multiple subtasks like getting to the enemy's flag, and returning the enemy's flag to your base. The priority of these will depend on whether or not you're holding the flag.
I'll try to have another update next weekend.







Bookmarks