Your first Blueprint calculation
Create two numbers, add them and print a result you can verify.
Before you start
Enable the plugin. This walkthrough uses a normal Actor Blueprint in your own project; it does not require a separate tutorial module or downloadable test project.
Connect the calculation
- Create an Actor Blueprint named
BP_NumberExampleand place an instance in your level. - In Event Graph, add two Make Number nodes. Set the first to Base
2, Exponent3; set the second to Base3, Exponent3. - Connect their outputs to Add, inputs A and B. You are adding 2000 and 3000.
- Connect the Add result to Is Success. Connect Event BeginPlay to a Branch, and Is Success to its Condition.
- From True, execute To Fixed String with the Add result as Value and Decimal Places
2. Connect its execution output to Print String, and its returned string to In String. - From False, use Get Error on the Add result and print the enum’s string representation. Compile and save the Blueprint, then press Play.
Print String displays 5000.00. The normalized number has Base 5 and Exponent 3. Pure arithmetic nodes are evaluated when their result is consumed; the white execution wires control the Branch and output.
Try a rejected calculation
Replace Add with Divide. Set the second Make Number to Base 0, Exponent 0. Keep the success check. Play again: the False branch should report DivisionByZero. Do not show the failed output as a valid balance.
Go beyond double range
Create a number with Base 1.25, Exponent 400. Feed it to Try To Double and inspect its success and error outputs. The Scientific Number is valid, but this conversion returns False with Overflow.
Continue with numbers and errors, then build a resource counter.