Animation Editor: State Machine – Arma Reforger
Lou Montana (talk | contribs) (Page creation) |
Lou Montana (talk | contribs) (Add Transitions) |
||
Line 28: | Line 28: | ||
'''Realtime:''' The '''State''' keeps time, and the time is incrementing as normal time. | '''Realtime:''' The '''State''' keeps time, and the time is incrementing as normal time. | ||
This is used primarily when the '''State''' is linking directly to an animation that needs to loop or transition out of the '''State | This is used primarily when the '''State''' is linking directly to an animation that needs to loop or transition out of the '''State'''. | ||
'''Normtime:''' The '''State''' keeps the time '''Normalized,''' which means that time inside of the state is going to be uniform and if passed to another node (described how to later) it is going to be the same for each node that it passes to. | '''Normtime:''' The '''State''' keeps the time '''Normalized,''' which means that time inside of the state is going to be uniform and if passed to another node (described how to later) it is going to be the same for each node that it passes to. | ||
|- | |- | ||
|'''Start Condition''' | |'''Start Condition''' | ||
|When the parent '''State Machine''' of the '''State''' is first reached, the '''Start Condition''' of each '''State''' is evaluated, and depending on which one is true, that one will be the starting '''State'''. If '''none is true,''' the '''first''' node that was created in that '''State Machine will be chosen | |When the parent '''State Machine''' of the '''State''' is first reached, the '''Start Condition''' of each '''State''' is evaluated, and depending on which one is true, that one will be the starting '''State'''. If '''none is true,''' the '''first''' node that was created in that '''State Machine will be chosen'''. This should be avoided when possible, as it could lead to unwanted final results. | ||
|- | |- | ||
| '''Exit''' | | '''Exit''' | ||
| When this is checked, any time that this node has will be passed up to the '''State Machine''' above, assuming there is one. | | When this is checked, any time that this node has will be passed up to the '''State Machine''' above, assuming there is one. | ||
This is explained in depth inside of the '''Transitions''' article. | This is explained in depth inside of the '''Transitions''' article. | ||
|} | |||
== Transition == | |||
Transitions are needed to go between between '''States''' inside of '''State Machines'''. | |||
To create a transition, right click on a '''State''' and click '''Insert Transition''' and then click on the next '''State''' to create the transition between them. | |||
All transitions have these properties: | |||
{| class="wikitable" | |||
! Property | |||
! Description | |||
|- | |||
| '''From''' | |||
| The node that the transition will go from | |||
|- | |||
| '''To''' | |||
| The node that the transition will go to | |||
|- | |||
| '''Condition''' | |||
| On the condition that the transition will execute upon. Read the '''Functions and Conditions''' article for further information on what syntax it uses. | |||
|- | |||
| '''Post Eval''' | |||
| Tick to enable. If the transition is using time to evaluate within its condition statement or while send time through its start time, this '''needs to be ticked''' ('''VERY IMPORTANT'''). | |||
Read more on this in '''Functions and Conditions'''. | |||
This is because the transition needs to keep the data even after the tick has finished evaluating. | |||
|- | |||
| '''Duration''' | |||
| The blend duration of the transition. | |||
'''Note:''' Has to be decimals, eg. 0.3, 1.0, or 0.0. | |||
If 0 or 1 are typed then they become an integer, and an error will appear. | |||
|- | |||
| '''Start Time''' | |||
| Using this will make the node the transition is blending to start at this time. Can be used to send time from one state to another. See '''Functions and Conditions'''. | |||
|- | |||
| colspan="1" |'''Blend Fn''' | |||
| colspan="1" |Lin - Linear | |||
SStart - Curve in then linear | |||
SEnd - Linear then curve out | |||
S - Blend in blend out | |||
S2 - Similar to blend in and blend out, but with a dip down at the start and a dip up near the end | |||
|} | |} | ||
{{GameCategory|armaR|Modding|Official Tools}} | {{GameCategory|armaR|Modding|Official Tools}} |
Revision as of 16:12, 2 June 2022
This article explains the concepts of a state machine and how they can be used in animation graphs.
State Machine
A State Machine is a basic functionality in any graph, and it is what decides what the animated object is currently doing, whether that is moving, idling, eating, eating while moving, and so on. A character can be in multiple States at once, but generally stays in one at a time.
State
A State is a child of the State Machine. It can be named anything and it will not conflict with the rest of the graph, as long as the name is unique inside its State Machine.
Each State has its own set of properties:
State | Description |
---|---|
Link | Every State has a Link that it connects to something in a graph, such as a Source Node, Blend Node, or another State Machine.
A node outside of the State Machine cannot link directly to a State inside of the machine, only to the State Machine itself. |
Time | Each State handles its own time inside of its Time property and it has three options.
Notime: The State does not keep any time, or use any time. Used when the State is linking to another State Machine that handles its own time. Realtime: The State keeps time, and the time is incrementing as normal time. This is used primarily when the State is linking directly to an animation that needs to loop or transition out of the State. Normtime: The State keeps the time Normalized, which means that time inside of the state is going to be uniform and if passed to another node (described how to later) it is going to be the same for each node that it passes to. |
Start Condition | When the parent State Machine of the State is first reached, the Start Condition of each State is evaluated, and depending on which one is true, that one will be the starting State. If none is true, the first node that was created in that State Machine will be chosen. This should be avoided when possible, as it could lead to unwanted final results. |
Exit | When this is checked, any time that this node has will be passed up to the State Machine above, assuming there is one.
This is explained in depth inside of the Transitions article. |
Transition
Transitions are needed to go between between States inside of State Machines.
To create a transition, right click on a State and click Insert Transition and then click on the next State to create the transition between them.
All transitions have these properties:
Property | Description |
---|---|
From | The node that the transition will go from |
To | The node that the transition will go to |
Condition | On the condition that the transition will execute upon. Read the Functions and Conditions article for further information on what syntax it uses. |
Post Eval | Tick to enable. If the transition is using time to evaluate within its condition statement or while send time through its start time, this needs to be ticked (VERY IMPORTANT).
Read more on this in Functions and Conditions. This is because the transition needs to keep the data even after the tick has finished evaluating. |
Duration | The blend duration of the transition.
Note: Has to be decimals, eg. 0.3, 1.0, or 0.0. If 0 or 1 are typed then they become an integer, and an error will appear. |
Start Time | Using this will make the node the transition is blending to start at this time. Can be used to send time from one state to another. See Functions and Conditions. |
Blend Fn | Lin - Linear
SStart - Curve in then linear SEnd - Linear then curve out S - Blend in blend out S2 - Similar to blend in and blend out, but with a dip down at the start and a dip up near the end |