dear readers, i'm having trouble designing the ai for my custom squid. i've been trying a lot of things recently, but none have worked as i hoped. i am now stuck on this, and i am asking for your support. to put it short: i want my squid to act like normal squid, but swim towards boats, if none in the area players, and if it can't find those it will swim towards other entities. any entity it comes in contact with is dealt damage. my latest attempt led me to copy-paste the original squid ai, but that only lead to more problems. i changed the squid to my custom entity but i changed very little otherwise, and i would like to hear if you have any idea how to fix it, and otherwise another method of achieving my goals. i have put the code in this file, with all of my classes in which my entity is referenced and the original squid ai.
thanks for bothering to read this, i really thank you.
my problem(custom entity).txt