1.6 - Simple Math

An overview of the Blueprints example level, example 1.6: Simple Math

Windows
MacOS
Linux

This example demonstrates how simple math equations can be performed on data within Blueprints. In this case, we add up the amount of time the game has run and apply the number of seconds to a Text Render Component.

Components

The Components for this example consist of two Text Render Components. One simply displays the number of seconds that have passed, the other provides a label for that text.

1.6Components.png

Construction Script

The Construction Script for this example simply sets the text of the Text Render Component to the value of IntegerVariable (private variable). This data is cast to a string in order to be compatible with the Text property of the Text Render Component.

1.6ConstructionScript.png

EventGraph

The event graph for this Blueprint handles the work of mathematical addition.

1.6EventGraph.png

  • On every tick (Event Tick):

    1. A 1-second delay starts.

    2. At the end of the delay, we add 1 to the current value of IntegerVariable and set the sum as the new value of IntegerVariable.

    3. Sets the text of the TextRenderComponent to the value of the IntegerVariable. This value gets cast to a string.

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback