Skip to content

Commit 42624f8

Browse files
author
rdeioris
authored
Update YourFirstAutomatedPipeline.md
1 parent 0c74ade commit 42624f8

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

tutorials/YourFirstAutomatedPipeline.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,35 @@ attack_state.node_find_pin('Out').connect(locomotion_state.node_find_pin('In'))
704704

705705
![The Kaiju Animation Blueprint State Machine Connections](https://github.com/20tab/UnrealEnginePython/blob/master/tutorials/YourFirstAutomatedPipeline_Assets/slicer_state_machine_connections.png)
706706

707+
Once the connections are made, we can define the transition graphs. Unfortunately the current binary release of UnrealEnginePython does not contain the node_get_title() method, so we need to reference the transition graphs by their id. Lucky enough, they are indexed in the order they are created:
708+
709+
```python
710+
# get transitions graphs
711+
locomotion_to_bored = state_machine.EditorStateMachineGraph.SubGraphs[3]
712+
bored_to_locomotion = state_machine.EditorStateMachineGraph.SubGraphs[4]
713+
locomotion_to_attack = state_machine.EditorStateMachineGraph.SubGraphs[5]
714+
attack_to_locomotion = state_machine.EditorStateMachineGraph.SubGraphs[6]
715+
716+
# locomotion to bored
717+
check_bored = locomotion_to_bored.graph_add_node_variable_get('Bored', None, -200, 0)
718+
check_bored.node_find_pin('Bored').make_link_to(locomotion_to_bored.Nodes[0].node_find_pin('bCanEnterTransition'))
719+
720+
# bored to locomotion
721+
check_not_bored = bored_to_locomotion.graph_add_node_variable_get('Bored', None, -300, 0)
722+
check_not_bored_not_bool = bored_to_locomotion.graph_add_node_call_function(KismetMathLibrary.Not_PreBool, -150, 0)
723+
check_not_bored.node_find_pin('Bored').make_link_to(check_not_bored_not_bool.node_find_pin('A'))
724+
check_not_bored_not_bool.node_find_pin('ReturnValue').make_link_to(bored_to_locomotion.Nodes[0].node_find_pin('bCanEnterTransition'))
725+
726+
# locomotion to attack
727+
check_attack = locomotion_to_attack.graph_add_node_variable_get('Attack', None, -200, 0)
728+
check_attack.node_find_pin('Attack').make_link_to(locomotion_to_attack.Nodes[0].node_find_pin('bCanEnterTransition'))
729+
730+
# attack to locomotion
731+
check_not_attack = attack_to_locomotion.graph_add_node_variable_get('Attack', None, -300, 0)
732+
check_not_attack_not_bool = attack_to_locomotion.graph_add_node_call_function(KismetMathLibrary.Not_PreBool, -150, 0)
733+
check_not_attack.node_find_pin('Attack').make_link_to(check_not_attack_not_bool.node_find_pin('A'))
734+
check_not_attack_not_bool.node_find_pin('ReturnValue').make_link_to(attack_to_locomotion.Nodes[0].node_find_pin('bCanEnterTransition'))
735+
```
707736

708737
TODO: compile the blueprint
709738

0 commit comments

Comments
 (0)