Knowledge base
Search Blueprint patterns
Searching…
Knowledge base
The structure WoalzCraft generates. Paste into the plugin to instantiate as a real Blueprint.
{
"nodes": [
{
"id": "n_begin",
"position": {
"x": 0,
"y": 0
},
"node_type": "EventBeginPlay"
},
{
"id": "n_set_hp",
"position": {
"x": 200,
"y": 0
},
"node_type": "SetVariable",
"variable_name": "CurrentHealth"
},
{
"id": "n_get_max",
"position": {
"x": 50,
"y": 100
},
"node_type": "GetVariable",
"variable_name": "MaxHealth"
},
{
"id": "n_damage",
"position": {
"x": 0,
"y": 300
},
"node_type": "EventAnyDamage"
},
{
"id": "n_get_hp",
"position": {
"x": 200,
"y": 400
},
"node_type": "GetVariable",
"variable_name": "CurrentHealth"
},
{
"id": "n_subtract",
"position": {
"x": 400,
"y": 350
},
"node_type": "Subtract_FloatFloat"
},
{
"id": "n_clamp",
"position": {
"x": 600,
"y": 350
},
"node_type": "CallFunction",
"input_values": {
"Min": "0.0"
},
"function_name": "FClamp"
},
{
"id": "n_set_hp2",
"position": {
"x": 800,
"y": 300
},
"node_type": "SetVariable",
"variable_name": "CurrentHealth"
},
{
"id": "n_branch",
"position": {
"x": 1000,
"y": 300
},
"node_type": "Branch"
},
{
"id": "n_compare",
"position": {
"x": 850,
"y": 450
},
"node_type": "CallFunction",
"input_values": {
"B": "0.0"
},
"function_name": "LessEqual_FloatFloat"
},
{
"id": "n_destroy",
"position": {
"x": 1200,
"y": 300
},
"node_type": "DestroyActor"
},
{
"id": "n_print",
"position": {
"x": 1200,
"y": 500
},
"node_type": "PrintString"
}
],
"variables": [
{
"name": "MaxHealth",
"type": "float",
"default_value": "100.0"
},
{
"name": "CurrentHealth",
"type": "float",
"default_value": "100.0"
}
],
"connections": [
{
"to_pin": "execute",
"to_node": "n_set_hp",
"from_pin": "then",
"from_node": "n_begin"
},
{
"to_pin": "CurrentHealth",
"to_node": "n_set_hp",
"from_pin": "MaxHealth",
"from_node": "n_get_max"
},
{
"to_pin": "execute",
"to_node": "n_subtract",
"from_pin": "then",
"from_node": "n_damage"
},
{
"to_pin": "A",
"to_node": "n_subtract",
"from_pin": "CurrentHealth",
"from_node": "n_get_hp"
},
{
"to_pin": "B",
"to_node": "n_subtract",
"from_pin": "Damage",
"from_node": "n_damage"
},
{
"to_pin": "Value",
"to_node": "n_clamp",
"from_pin": "ReturnValue",
"from_node": "n_subtract"
},
{
"to_pin": "Max",
"to_node": "n_clamp",
"from_pin": "MaxHealth",
"from_node": "n_get_max"
},
{
"to_pin": "execute",
"to_node": "n_clamp",
"from_pin": "then",
"from_node": "n_subtract"
},
{
"to_pin": "CurrentHealth",
"to_node": "n_set_hp2",
"from_pin": "ReturnValue",
"from_node": "n_clamp"
},
{
"to_pin": "execute",
"to_node": "n_set_hp2",
"from_pin": "then",
"from_node": "n_clamp"
},
{
"to_pin": "execute",
"to_node": "n_branch",
"from_pin": "then",
"from_node": "n_set_hp2"
},
{
"to_pin": "A",
"to_node": "n_compare",
"from_pin": "CurrentHealth",
"from_node": "n_set_hp2"
},
{
"to_pin": "Condition",
"to_node": "n_branch",
"from_pin": "ReturnValue",
"from_node": "n_compare"
},
{
"to_pin": "execute",
"to_node": "n_destroy",
"from_pin": "then",
"from_node": "n_branch"
},
{
"to_pin": "execute",
"to_node": "n_print",
"from_pin": "else",
"from_node": "n_branch"
}
],
"parent_class": "Actor",
"blueprint_name": "BP_Destructible"
}