New bandmember AI done
The new AI for bandmembers is done. The new orders menu is done as well. The new AI can deal with being in a shelter, taking fire, being cornered, etc, as well as follow orders or do actions. It now automatically favors missile weapons and skirmish mode before hand weapons and melee mode. Only thing left is to make it use sprint speed, and play the correct animations (sneak, walk, run, etc). right now it doesn't do sneak or sprint animations, as those are new AI capabilities. a simple fix, if sneaking, animation=sneak, else if walking, animation=walk, etc.
It almost worked perfectly the first time. bandmember_is_cornered needed to take into account being inside a temporary shelter. it simply does a check for something_in_way_of_location 4 feet north, south, east, and west of the bandmember. but when they're inside a temp shelter with a BBox radius of 5 or 10, that doesn't quite work so well.... i had to make it check for badguys and leave a shelter before doing common AI such as cornered, collision, recovery, taking fire, nearby threat, etc - not after doing the common AI. i also had to make it leave a shelter before it tried to follow orders when there were no badguys around. and i forgot to call mouse_turn_camera in the raypick code for goto and designate target orders. the new AI code is about 2000 lines of source. the new orders menu code, including raypick code, is about 700 lines of source.
i plan to post some code so people can see how it turned out. basically its as it appears in the pseudocode in the previous journal entry. at the lower levels, some of the existing low level AI routines were suitable for reuse with no alterations, so they were used.
Previous Entry
Issuing orders to party members and refactoring AI...
Next Entry
New band member AI code
Advertisement
Latest Entries
Realtime mocap used in Hellblade
2566 views
Use of the Golden Ratio when modeling plants
4437 views
Increasing ET accuracy in fix-your-timestep
4310 views
Photrealism
2575 views
"instancing" with DX9
3503 views
Status report 6-15-2016
2604 views
Advertisement
Advertisement