Skip to content

Eval expression

94

The Eval expression node is the "Swiss Army Knife" of mathematics in ERGS. Instead of stringing together dozens of simple math nodes, you can write a complex formula directly into the expression property using variables A through F.

When to use this node: * Complex Scoring Formulas: Calculating a final game grade based on multiple variables, such as: (A * 100) + (B * 50) - (C * 10) where A is items, B is puzzles, and C is hints used. * Coordinate Transformations: Calculating the target position for a 2D or 3D prop using trigonometric or geometric formulas. * Bitwise Logic: Performing advanced bitwise AND (&) or OR (|) operations on raw hardware data streams.

Pro Tip: Use this node to keep your diagrams clean. If you find yourself using more than three simple math nodes in a row, an Eval node is likely a more readable and maintainable choice.

Connectors in

  • expression [type: string]
  • A [type: float]
  • B [type: float]
  • C [type: float]
  • D [type: float]
  • E [type: float]
  • F [type: float]

Connectors out

  • value [type: variant]

Node properties

  • A [type: float]
  • B [type: float]
  • C [type: float]
  • D [type: float]
  • E [type: float]
  • expression [type: string]
  • F [type: float]