Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mBehaviour = bt::Builder()
- .Parallel()
- .Sequence("Heal")
- .Condition([this] { return NeedHealing(); })
- .Do([this] { return UseHealingPotion(); })
- .End()
- .Selector("AttackOrRunAway")
- .Sequence("Attack")
- .Condition([this] { return !NeedHealing(); })
- .Do([this] { return LookForTarget(); })
- .Do([this] { return SelectWeapon(); })
- .Selector()
- .Sequence()
- .Condition([this] { return IsTooCloseToEnemy(); })
- .Do([this] { return SetMoveDestinationFarEnoughFromEnemy(); })
- .End()
- .Do([this] { return SetMoveDestinationEnemyPosition(); })
- .End()
- .Do([this] { return MoveToDestination(); })
- .Do([this] { return LookAtActor(); })
- .Do([this] { return AimAtLookPoint(); })
- .Do([this] { return UseWeapons(); })
- .End()
- .Sequence("RunAway")
- .Do([this] { return SetMoveDestinationDefault(); })
- .Do([this] { return LookAtWaypoint(); })
- .Do([this] { return AimAtLookPoint(); })
- .Do([this] { return MoveToDestination(); })
- .End()
- .End()
- .End()
- .Build();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement