My question (TLDR):
How to make modular logic for AI-Behavior/AI State Machine that requires multiple objects in CustomObject logic, ObjectBehavior logic and CustomFunction logic? Split the logic parts in modular pieces (StateHandling, MovementHandling, ObjectPicking)? Make it modular at all, or all in one place?
Appreciate ![]()
Hey there,
I want to learn and use the extension architecture more often, and I have done so before. In many cases it was delightful to use. It is said to be particular essential, when the project gets more complicated, and that is often true. I just hit a wall, as soon, as I am creating systems, that require multiple objects in almost any situation.
My example ist Unit AI Behavior (I will stick to the basics):
Objects: Unit, ResourceNode, Building
Variables/Properties: IDs, TargetIDs, States, Stats/Attributes
Major picking actions: Variables/Properties, Nearest, Linking(TargetID)
Now, using an Custom Extension for the Unit AI Behavior is giving me an headache. It is not too hard, to manage the whole StateMachine/UnitAI in the classic Events Sheet, but I want to learn how to do it in a Custum Extension. I can’t get my head around, how to approach it… If it is useful at all, to ecapsulate it in a modular system… If and how to split it in CustomObject logic, ObjectBehavior logic and CustomFunction logic…
EDIT:
I quickly created a simplyfied version of an Unit AI, to demonstrate the concept (please don’t mind not having variables declared, its just to demonstrate)










