Skip to content

Custom chase functions

inkoalawetrust edited this page May 4, 2023 · 1 revision

NOTE: As of 4/5/2023, there is no full replacement for A_Chase in the library, but I will be making one eventually.

As part of the KAI library's AI features, you can not only use all the functions, properties, classes etc provided by the library for your NPCs. But A_Chase() is also practically deprecated (However you can still use it if you want or need it, of course). Not only does the library include chase functions for each NPC type (TBD), but you can also easily create your own custom chase functions. Allowing you to make your own new NPC types with unique chase behavior. Or to make unique chase functions for your individual NPCs even, giving them entirely unique behavior each.

Built-in chase functions

Here is a list of all the chase functions included in the KAI currently:

Not really part of the KAI, but the stock A_Chase can still be used by KAI NPCs, there is no set in stone recipe for making a KAI NPC after all.

The chase function used by ground based NPC vehicles.

Building blocks

The KAI library includes several ZScript exports' of A_Chase()'s native C++ code, which can be found here. These exported functions can be used as the building blocks for your custom chase functions, and the built-in chase functions of the library use them as well. In fact, some of them are practically necessary, like for allowing custom chase functions to still work with patrol points.

See also

Clone this wiki locally