• entries
    44
  • comments
    44
  • views
    58670

New bandmember AI done

Sign in to follow this  
Norman Barrows

514 views

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.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now