Hi there, I'm fairly new to Construct 3 but I've been pretty happy with what I've been managing to accomplish in a short span of time.
For my next goal I want to do the following:
I have three objects that are relevant here, say, player, pet and enemy.
If there are enemies whithin a certain distance from the player: I need the pet to move in the direction of and "attack" the closest enemy to the player and check if other enemies meet this criteria. (I'm concerned with the possibility of the pet checking constantly for enemies and not finishing them off before moving to the next target)
If the player leaves a certain threshold distance from the pet, I need it move back into that threshold if the above criteria is not met.
And,finally, I want the pet to move around whithin that above mentioned threshold, stopping every few seconds to play an iddle animation if the two situations above are not met.
So, a pretty basic pet AI.
In the ideal world I would have toggles for the range of the thresholds mentioned above and/or toggles to enable/disable any of the above behaviors. (For the sake of future proofing since pets are going to be the main mechanic of the projects I plan on working on).
How's the best way to go about these? I know this is a chunky one but any insight and input is dearly appreciated.
Thanks in advance.