Update Text Widget Based on Array Index

I’m trying to create a text widget that updates based on what Index/ID an array lands on.

I have a blueprint in my player pawn that cycles the player through an array of locations in numerical order between 0 - 19 on a button input.

I just need a widget that can read and update based on this. For example, when the player is at location ID 0, the text will read “Garden”, when the player is at location ID 1, I want the text to read “Living Room” , when the player is at location ID 2, I want the text to read “Bathroom” , etc all the way through to 19.

I know how to create a binding to change the data of the text, I just can’t figure out how I can call the array so " If Location Array Index = 1, branch to a new text return node , If Location Array Index = 2, branch to a new text return node " etc.

Is anyone able to help with this? Would be massively appreciated!! :slight_smile:

You could try using a map:

My Products

1 Like