Skip to content

vitorestevam/GML-Behavior-Tree

Repository files navigation

GML Behavior Tree

The classic Behavior Tree to GMS 2.3+

if you don't know what you're doing here or need to learn what is a Behavior Tree, you can see it on our references

How to use

//create
function TaskChangeColor() : BTreeLeaf() constructor{
	name = "TaskChangeColor";
	
	/// @override
	static Process = function(){
		black_board_ref.user.image_blend = c_yellow
		return BTStates.Success;
	}
}

bt_root = new BTreeRoot(id);
var change_color = new TaskChangeColor()
bt_root.ChildAdd(change_color)

bt_root.Init();

//step
bt_root.Process();

More details on

Contributors

References

And a especial thank you to squircledev who shared some drafts with us :)