Overview
Firstly its been a while since i've posted basically an entire month! But thats not been a month in vain. Since the last iteration I have decided to do a complete new iteration of the code that I had and put on a moving cube. This is so as to just code the AI without animation so I can focus fully on the code and then move the working code to the golem model when ready.General Script Iteration
I went through all the scripts mentioned previously within this blog and redid the code from scratch using the previous ones as reference. Mostly nothing was changed with just the few cleanups and the like. The patrol and the search stayed as the last iteration due to having already changed these two scripts to a higher level already.
Animator
Due to the model now being a cube, and no rig, I set up a completely new animator along with unity animation. I gave the model two hands that moved back and forth to show when the AI was moving and a second state that would stop them moving when in combat. The transition between the non-combat and combat states happen when a combat bool becomes true. I also implemented a punch and slam animation. These two movements were chosen due to the group asking for these two attacks. Again two bools are set up ready to call these. Setting up an animator has become an easy enough task for me now however I haven't touched layers yet. But a bit of research into layers via tutorials and the API have cleared this up and suggests the use of layer masks could be a good route to go depending on how the group wants the golem AI to work in combat.Current AI animator |
No comments:
Post a Comment