Today i basically spent the whole day rewiring and trying to debug a couple of issues
reposition the characters (player and guard) so that they will be pulling the art in a coherent direction
switch the behaviour from patrolling to chasing/pulling when the guard sees the player holding the art (right now it is not consistently executed)
the AI perception is not updating frequently enough to get the latest information that the player is holding the art, therefore unable to switch from patrol state even if the player is right in front of them with the art
I first started off getting a refresher on what blueprint interface does because the set up i had for the initial behaviourial change for the AI is a mix of AI sending signal to start pulling and then the player has to send a signal that the pulling is over and who won.
This tutorial was useful in explaining why the functions change usage in other blueprints that implement this interface when you add an output to the function (it requires a return node), but they didn’t actually go into explaining how to use a function with an output.
A different tutorial actually explains how to use interface function to fetch a variable from one blueprint and pipe it into another. This was helpful but at the end of the day I decided that I need to switch make to the event of begin overlap with a collider to kick off the event of start pulling with my player instead of getting the AI to fire off the event. Problem with that is that when the AI can’t see the player, and the player brush pass the AI it will still trigger the pulling while the AI is in patrol mode
I then spent a few hour mangling with the AI behaviour tree to try to get the AI to actually recognise the player is now visible and holding a piece of Art work to kick off the chase. it’s a little bit tricky because the bug is not consistent. I find that if i get to the art relatively fast (which i do now that i have played so much) before they finish the first loop of patrol, the Ai fails to detact me.
Tomorrow I will continue to try to figure out how to consolidate the variables so there isn’t as much game state sync issues.