So today I was incredibly ambitious by embarking on the journey to try to engage in the tug a war with the guard that intersects with you.
There is a lot of complex states. a couple of things I wanted to achieve
when the player and the guards are within the proximity, both parties are not moving and animates to the pulling animation clip
after 3 seconds (I learnt about timer with events from this tutorial), check how many times the space bar is tapped if it is above 12 times then the player have successful beaten the guard.
if it was success the character can resume motion and have a cool down time of 5 seconds before the guards may catch up again
Holy moly that was a lot of mind gymnastics for me. I haven’t gotten it right so i have recorded a couple of bugs for us to look at
the AI behaviour tree is not accurately locking into the state of pulling. Instead she just walks away
there is a mismatch in the animation state, also i would like them to be a little bit further a part. i need to reposition them
triggering the wrong state. sliding the player all over the place.
I am going to LA tomorrow for a week so I will need to take a break from this hopefully when i come back i would have some new ideas and also a refreshed mind to try this again. I think most of the issues here is that the AI behaviour tree isn’t really set up for this. it gets stuck in pulling mode without being able to transition off to other sequences.
I thought I was going to stop there but instead I added widget ui animation to the success menu and hooked up to replay level and animation. I also added camera shake to the tugawar.