-
Book Overview & Buying
-
Table Of Contents
CryENGINE Game Programming with C++, C#, and Lua
By :
The process of creating custom AI is relatively straightforward, especially if you're comfortable with the actor system introduced in the previous chapter.
There are two parts of each actor; its IActor implementation and the AI entity definition.
AI actors typically use the same IActor implementation as the player, or at least a shared derivation.
Registering an AI actor in C# is very similar to how we did it in Chapter 5, Creating Custom Actors. Essentially, all we have to do is derive from CryEngine.AIActor instead of CryEngine.Actor.
The AIActor class derives directly from Actor, and therefore does not sacrifice any of its callbacks and members. However, it has to be explicitly implemented in order to make CryENGINE treat this actor as if it is controlled by AI.
public class MyCSharpAIActor
: CryEngine.AIActor
{
}You should now be able to place your entity from the AI category in the Entity browser, within Sandbox:

As with...
Change the font size
Change margin width
Change background colour