-
Notifications
You must be signed in to change notification settings - Fork 0
Math Node
Noogear edited this page Mar 11, 2026
·
2 revisions
math 节点对数学表达式求值并将结果存入变量。
- math: "<expression>"
store: "<variableName>"| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
math |
String | 是 | 数学表达式(支持 {变量} 引用) |
store |
String | 是 | 结果存入此变量名(double 类型) |
- math: "{damage} * 1.5 + {bonus}"
store: "finalDamage"- math: "clamp({attack} * (1 + {level} * 0.05) - {defense} * 0.3, 1, 99999)"
store: "finalDmg"- math: "{base} * (1 + rand(0.4) - 0.2)"
store: "randomizedDamage"- math: "sqrt({x}^2 + {y}^2 + {z}^2)"
store: "distance"- math: "{isCritical} >= 1 ? {damage} * 2 : {damage}"
store: "finalDmg"完整的运算符、函数、优先级参考 → 数学表达式