Right now the engine includes a few basic AI scripts for your enemies (or friends). These are components you can add to your characters (simply via the AddComponent button at the bottom of the character’s inspector), and it’ll make them perform actions without the need for input from the player. To use them, you need to have a Character setup properly, with (at least) the required components for each AI script. Each AI script may require certain particular Abilities, but all of them require that you have a CorgiController and a Character. You can also try combining them : for example you can add AI ShootOnSight and AI Walk to a Character and it’ll be able to walk around and shoot at your player. More AI scripts are coming soon to help you create more diverse enemies, but feel free to create your own AI scripts, it’s really easy and fun to do.
This component requires a CharacterHandleWeapon component. What it does is cast raycasts to its left and right, targeting the objects on the layers you’ll have specified in its inspector. If one object hits these raycasts, the AI will shoot at it using its current equipped weapon.
This component requires a CharacterHorizontalMovement component. It’ll allow your AI character to walk. You can specify the desired behaviour in its inspector. From there you can have it patrol (walk randomly and change direction when hitting a wall or optionnally a hole), or walk on sight, which means the AI will “look” (using raycasts) for objects on the layers you’ll have specified in its inspector. If a raycast hits such an object, the character will move towards it.
This component requires a CharacterHorizontalMovement component. Add this script to a Character to make it follow (or try to follow) the main Player character. If it has a CharacterRun component it’ll try to run when far from target. If it has a CharacterJetpack it’ll try to jetpack over obstacles to reach the target, and if it has a CharacterJump component it’ll try to jump over obstacles.
A standalone AI component with no prerequisite, it will let you have an object follow a surface, like a spider crawling on walls. From its inspector you’ll be able to define what direction the crawler should take, the speed at which it moves, what surface to “walk” on, and precisely configure its various raycasts based on your context and crawler specifics. You can see an example of that in action in the RetroMountains demo scene, with the RetroFireballCrawler.