add_math_expression_node
Adds a Math Expression node to a Blueprint, converting a formula like (A+B)*C into a collapsed graph with input pins for each variable and a Return Value output.
Instructions
Add a Math Expression node (collapsed graph from a math formula string).
From Ch. 15: The Math Expression node creates a collapsed graph based on a typed expression. Variable names in the expression become input pins, and the result is the Return Value output pin.
Example from the book: (PlayerLuck/5) * (EnemyHP/30) Creates input pins PlayerLuck and EnemyHP.
Args: blueprint_name: Blueprint to add the node to expression: Mathematical expression string (variables become input pins) node_position: [X, Y] graph position
KB: see knowledge_base/01_BLUEPRINT_FUNDAMENTALS.md#overview Example: add_math_expression_node(blueprint_name="/Game/MCP_Test/BP_Example")
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | No | (A + B) * C | |
| node_position | No | ||
| blueprint_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |