Instances of a bb text objects with different text in each

Hello. In my game I have lots of bb text objects: one for each quest. The quests are arranged in the order they are given to the player and I use a variable to track the completion state of each quest. It works the way I want it to, but…

The number of text objects is getting bigger, taking up a lot of room in my object list. I was wondering if I could use just one bb text object and populate instances of it with different texts. Is this possible?

My bb text objects are created with events and are not present on the scene when the game runs. Once created, an action fills them with the appropriate texts e.g. questTextObject01 = “Buy milk”, questTextObject02 = “Find Sally”.

I use instances in another part of my game, for an icon in my scenes, and I use ‘distance between’ for that and an ID variable, but I can’t relate that experience to this rather different text object query. I don’t know how to create instances of a text object in an event and assign a unique identifier it to. Thank you for your time.

Not directly in the editor. But, and this is a technique I use, you can add a string instance variable to the text object, and set the value of the variable in the BBText object’s properties panel.

In a beginning of scene event, use an action to set the BB text to it’s variable:

1 Like