I want make a game of fps with a some of rts , the focous not are the fight but the tactic and strategy , in my game I want add a command mod with limeted aspects , first the commander just can command in his base ( a super spaceship or super tank and the player can use them to attack to save a unit , capture territory , or any think he want) and second the commander have default formations to use ( he can change if want )
I want too add fuel system to vehicles like have to munytion
So this are my questions , I thank for any help .
Have each command be a function. So say your AI has: MoveToLocation, MoveToActor,** bShouldMove**, bShouldFire, bCanPurse, FireRange, and DetectionRange variables in it’s blackboard. Let say your order is to capture the base…* CaptureBase(Location);* right? First, you have to move towards the base, but you also want to fire if you see an enemy. So you set bShouldMove, and bShouldFire to be true. Also set MoveToLocation. Your base AI would move towards the location, and shoot things on the way. Say you wanted to defend an area: Defend(Location);. You’d set MoveToLocation to Location, and then you’d set bShouldMove, and bShouldFire to be true. Once at the location, set bCanPursue to true and bShouldMove to false. When bCanPursue is true, if the AI sees an enemy, it would follow it by setting MoveToActor to be the enemy.
This would involve setting up a Behavior Tree and Blackboard, as well as tasks, services, and decorators. You’d also want to set up several helper functions, and a UI to issue them. It’s quite a bit to handle all at once, but the docs will help.