What this episode is about

Your robot's ID card gets an energy bar: a base power, a bonus, and a consume rate, all added straight into the id card node. Then, in a brand new Power Math node, we reference those values by node name instead of relying on the immediate connection like Episode 5 did — and immediately hit a classic beginner trap: the math comes out as "5035" instead of 85, because the fields were set to String instead of Number, so plus meant "glue these words together," not "add these numbers." We fix the data type, get the real answer, then subtract a dynamic consume field to see what's left.

What you'll learn

  • Adding two numbers together inside an expression
  • Referencing an earlier node by name — $('id card') — instead of only the immediately connected one
  • Why + on two String fields glues text together instead of doing math, and how to spot it
  • Fixing it by setting your fields to the Number data type
  • Using bracket notation for a field name with a space in it, like ["bonus power"]
  • Subtracting a dynamic field instead of a hardcoded number, and testing it by changing the source value
Today's metaphor: The Energy Bar