What is Muse Behavior?
Muse Behavior is a tool that lets you create custom logic for game characters and objects in an easy-to-use workflow. Like a classic behavior tree model, Muse Behavior consists of nodes and branches that read from top to bottom and left to right.
Please note that this is an experimental tool, which means there's more to come, but also room for improvement. For the moment, Muse Behavior is not compatible with multiplayer games and the save game option.
This documentation will give you an overview of the tool: how to use its interface, what the different variables and nodes are, how to use them, and so on.
Let’s start with the basics.
Muse Behavior Interface
How to create a Muse Behavior?
To start using Muse Behavior, simply select any asset in your game and click on “Muse Behavior” in the asset options.
Then click on the ➕. It will open a new graph.
You're now ready to build your first Muse Behavior!
How to navigate on a graph?
Muse Behavior Controls for Struckd Web
Mouse controls
Left-click to select something on your graph (a node, an arrow). You can click and hold to multi-select.
Right-click on the background to add a Node or a Sticky Note, paste or delete something you previously copied.
Right-click on a node will give you multiple options:
- Duplicate
- Copy / Paste
- Delete
- Align: to clean up your graph
- Immediate children: aligns the directly connected node.
- All children: aligns all connected nodes below it.
Hold the Scroll Wheel to move on the graph.
Scroll the Wheel to zoom in & out.
Select and hold a node to move it on your graph.
On the Variables blackboard, click on the ➕ to create a new Variable.
On the Node List:
- Click on any node to add it to your graph.
- Hover over the ℹ️ to get more information on a node.
- You can expand the node categories by clicking on the 🔼.
- Use the Search function to look for a specific node.
You need to link nodes with arrows for your graph to work. Click, hold, and drag from the bottom of a node to create an arrow. Release on the background to add a new node or link the arrow to an existing node.
Keyboard shortcut
Press Space to add a Node or a Sticky Note, paste or delete something you previously copied.
You can copy-paste a node with Ctrl + C for Copy and Ctrl + V for Paste on Windows, Command + C and Command V on Mac.
To move on your graph, hold Alt + Left Click on Windows or Option + Shift + Left click on Mac.
Press Backspace to Delete a selected node or arrow.
Web interface tips
The Muse Behavior web interface is customizable. You can resize and move the Variables and Node List panels as you wish:
- To resize a panel, select and hold the border of the panel and resize it.
- To move a panel, select and hold its name, then move it where you wish.
Muse Behavior Controls for Struckd Mobile
Double-tap on the background to add a node or a Sticky Note.
Hold one finger on the background to move on your graph.
Use two fingers to zoom in & out.
Tap on Variables or Node List to expand the panels. Note that they cannot be opened simultaneously, opening one will close the other.
On the Variables blackboard, tap on the ➕ to create a new Variable.
On the Node List:
- Tap on any node to add it to your graph.
- Press and hold ℹ️ to see more information on a node.
- You can expand the node categories by tapping on the 🔼.
- Use the Search function to look for a specific node.
You need to link nodes with arrows for your graph to work. Drag your finger from the bottom of a node to create an arrow. Release your finger on the background to add a new node or link the arrow to an existing node.
When you select a node, a green menu appears at the top left of your screen. Click to enlarge. It will give you the option of duplicating or deleting the node or aligning children.
Nodes
On the right side of the screen, there is the Node list. You can expand and collapse node categories by clicking on the 🔼. Use the Search bar if you’re looking for a specific node.
Click/Tap on any node to add it to your graph.
On Desktop, you can customize the size of this panel by selecting and holding its border and resizing it.
Let's take a look at each type of node.
System
The system is the root of a behavior graph. It is required to execute a behavior tree. You must connect the System node to the rest of your graph with an arrow. From here, the behavior tree is executed from top to bottom, left to right.
By default, the Repeat option is disabled, but you can enable the Repeat if you wish your graph to be executed several times. Some nodes require the Repeat toggle to be enabled.
Actions
Action Nodes execute some action related to our assets. They determine what will happen when a Condition (or Logic) is met. It must be linked to a Condition or Logic by an arrow. This is what the player will see while playing (ie. An object moves, a dialog opens, the weather changes...).
Conditions
A Condition is a requirement for an Action to occur. When the Condition is met, the associated Action node is triggered.
Flow
The Flows control how the nodes are executed. They are optional.
They can be used to make several branches run in parallel or to make the graph run in a specific order or until certain conditions are met (such as Success/Failure).
Logic
Logic nodes are utility nodes used to configure custom logic. They can be used to transform data into variables or to convert a variable into another type of variable. They are very useful for building more complex Muse behavior graphs.
Sticky Note
You can add a sticky note anywhere on your graph by right-clicking on the background, and add a Sticky Note. Double-click on a sticky note to edit it.
They're useful for commenting on a graph, for yourself, or for anyone who copies your game containing custom logic.
Variables
Variables can be added in 2 different ways:
- By creating a node: the type of variable depends on the node (game object, vector3, float…).
- By opening the Variables blackboard at the top right and clicking on the ➕. From there you can select the type of Variables you want to add.
When you add a new variable, you can name it. We encourage you to give your variables self-explanatory names, to make your graph easier to understand and update.
Once a variable has been created, you can right-click to delete or rename it.
Note that variables can be reused by different nodes in a graph.
There are different types of variables, which we will describe below.
Object
A GameObject corresponds to an asset. For each GameObject you add, you must assign an asset from your draft.
You'll be able to assign an asset to your GameObject once you've left the graph, from the Muse Behavior variables list screen. Once in this panel, click on Assign, then select the asset in your draft.
Each GameObject used on nodes is followed by a Specific option (which is disabled by default). You must enable it if you want ONLY this specific asset to be assigned to this GameObject.
In the example above, when the player jumps, only a specific cow, which we've named Cow 1, plays the jump animation. If we disable the Specific option next to Cow 1, all cows in the game will jump when our character jumps.
Float
A float is a type of numerical data. It is a number that includes a fractional or decimal component (ie: -2.14, 0.000456, 48.3).
You need to create floats to set up some values such as stats, seconds, distance, etc.
Integer
An Integer (Int) is another type of numerical data. It is a whole number without a fractional or decimal point (ie: -2, 34, 5608).
It’s mostly useful to set up point values in Logic nodes.
String
A string is a data type used to represent a sequence of characters. Strings are typically used to store and manipulate text.
Strings are used by nodes that display text on the screen, on an object, or in a speech bubble.
Boolean
A Boolean variable in a behavior tree is like a simple "true" or "false" flag that helps control decisions in the tree.
It’s mainly used with the “If” Logic node, but you can use it in other places to control a state.
Let’s illustrate with an example:
When the player collects the key, we set the KeyCollected (which is a Boolean) to True.
When the player starts the dialog with the Guardian, if the KeyCollected is set to True, the Door opens, the KeyCollected status changes to False and the key is removed from the player’s inventory.
Vector3
A Vector3 is a mathematical object in 3D space, represented by three coordinates (x, y, z). It mostly represents positions, directions, and velocities in three-dimensional space. It can also be used to define the size of an asset.
From the Muse Behavior variables list screen, you can also click on the little target and click anywhere in the scene to set a position.
Join our Discord to discuss Muse Behavior with the Community or contact our Customer Support if you have any questions.
Comments
21 comments
18 Bande hone chahiye jisme 4 Bandi hogi
bgmi
Best
pito
tạo game kiểu gì đấy
me parese fino cree un juego pero seria bueno que pudieramos crear nuestros propios personajes
car similor.
Pair of words
Pair of words
Sanket
Apps store
Gooooooo heeeeeeeeeeeee
Nature
Sir class
Sir class
Prbl
Dinuth Nethsara
Cartoon
Vvv
Please sign in to leave a comment.