This is my almost finished AI for my game I'm making. Arrows and WASD to move the little blue square. Holding W/Up Arrow whilst hugging a wall will let you shimmy up the wall of interest The pink square sort of follows you and mimics your movements but with a delay, its a long process so I put a explanation below vvv
------------------DEVELOPER EXPLANATION:----------------------- This Project is mostly focused torwards Cherretta, your AI teammate with seemingly crazy attachment issues since she will follow you. Think Nana from Ice Climbers in Super Smash Bros. These are the AIs mechanics so far, with explanations: - DELAYED JUMPING: Cherretta will jump exactly a quarter of a second when you jump, but only if: She is on the ground when the delay ends She is in the Ai Bounding Box (see below v ) -AI BOUNDING BOX: You will notice a extra hitbox that is around the blue hitbox. this is the AI Bounding Box. The ABB is a hitbox that Cherretta is constantly aware of, and she will route herself to get in contact with it if she ever leaves it. The Bounding Box has two states: Command Stay and Active Movement. You can toggle between both by using the Spacebar. The Active state is when the hitbox is purple. it will stamp on your character and is designed so for Cherretta to follow you. The Command Stay state is when the hitbox is red. It will stay where you were when you toggled it, but if it is airborn, it will glue itself to the ground. If there is no ground under you when you toggle Command Stay, the toggle won't work and will stay in the active state. -There is also a beta feature for if Cherretta gets stuck with a wall(s) between the two of you. If she remains stuck for a consecutive 5 seconds, she will teleport to either: You, if the AIBB is in Active mode, or The AIBB, if it is in Command Stay mode. The untrapping feature for Cherretta is still being worked on, and only works if Cherretta is stuck at a wall trying to follow you or if she is downright clipped in a wall. It also works vertically now. #Ai