Skip to content

This UE4 plugin offer a simple way to create a "step by step" flow on a behavior tree.

License

Notifications You must be signed in to change notification settings

NansPellicari/UE4-BehaviorSteps

Repository files navigation

Behavior steps

This plugins offer a simple way to create a steps flow on a behavior tree.

ℹ️ To see a most advanced usage, please take a look at my Dialog System plugin:
https://github.com/NansPellicari/UE4-DialogSystem

Buy Me A Coffee
I've decided to make all the code I developed for my games free to use and open source.
I am a true believer in the mindset that sharing and collaborating makes the world a better place.
The thing is: I'm fulltime dedicated to my project and these open source plugins, for coding I need a looooot of coffee, so please, help me to get my drug 😝 !!

1. Requirements

1.1. UE4 Plugins

2. Steps Handler

  • The StepsHandler is a c++ Interface (see IStepsHandler.h), which allow you to create you own StepsHandler object.
  • It is instanciated by the CreateStepsHandler service's node (see section below) in a BehaviorTree (aka BT), you just have to choose the class object you need to work with.
  • A basic StepsHandler (see StepsHandlerBase.h) is provided here, this way you can directly use this plugin.
  • In the GGTest folder, you can check directly some basics usages.

3. Behavior Tree nodes

Node Node Type Usefull for/when
Step Composite It is dedicated to control the steps flow. It checks first if it can run children depending on its order in the BT, then it plays all of the children (you can choose to play them as sequence or selector nodes do). When the last children is played, it allows the next step to play.
CreateStepsHandler Service It should be the first element you need in your Behavior tree, it instances the steps Handler object and save it into the BlackBoard (BB) for the next nodes.
ClearSteps Service This should be called before ending the BT. It cleans up the handler to its initial state.
EndStep
EndStep
Service/Task (Optional) You can used it to prematurely end the current step. It can be associated to a Decorator node for example to create an optional BT branch.
JumpTo
JumpTo
Service/Task It tells to the handler which is the next step to play, breaking the default flow.
⚠️ Be careful that it can't replay and already played step. For that use RedoStep.
RedoStep
RedoStep
Service/Task This will replay an already played step.
⚠️ Be aware of: this will reset all steps which has been played after the steps you specified in the Steps Handlers history.

4. Contributing and Supporting

I've decided to make all the code I developed for my games free to use and open source.
I am a true believer in the mindset that sharing and collaborating makes the world a better place.
I'll be very glad if you decided to help me to follow my dream.

How? With
Donating
Because I'm an independant developer/creator and for now I don't have
any income, I need money to support my daily needs (coffeeeeee).
Buy Me A Coffee
Contributing
You are very welcome if you want to contribute. I explain here in details what
is the most comfortable way to me you can contribute.
CONTRIBUTING.md

About

This UE4 plugin offer a simple way to create a "step by step" flow on a behavior tree.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published