Help with creating/using lists

Garnette 2 years ago updated 2 years ago 2


I am trying to use a flow macro to create a list and then set that list as a saved variable of type 'AOT list' so that I can reference it in a state machine and pull in an item from this variable AOT list with a 'Get List Item' unit by index #.  I'm using a 'Create List' unit with 'string literals' in the flow macro and then setting the saved variable.  The list item is text that needs to display in a TMP text game object.  Not working...what am I doing wrong?  Is there another way to set up a static list that I am missing?  Is the variable type incorrect?  I tried setting up the list in the variable window and when it went to execute pulling in the one list item (index 0) it jumbled multiple list items.  Any guidance would be appreciated.  While I've seen videos on how to generate a list during gameplay, I can't find anything about setting them up before.  Thanks! 

Bolt Version:
Unity Version:
Scripting Backend:
.NET Version (API Compatibility Level):

I'm not sure if I understand you correctly but is that what you wanna do?

But to be honest I didn't use saved variables at all.
When I have to manage content I use scriptable Objects like this:

The scriptable Objects are created with this script:

Hi Elin,

Thanks for the response!  I managed to get what I was trying to do working.  I was using a unity event vs. a start event and that wasn't working.  I'm so new at this, I don't really understand why but, figuring it out via very painful trial and error :).  Any way, this is what I have ended up with, which is working.  I have zero understanding of code so, ideally I don't need any.  Would appreciate your input on any tweaks to make what I did more efficient.

This is the flow macro where I set the text elements to my list:

This is the start state where I pull in the list item - last action at the end: (among other things)

Thanks a bunch!  You're a huge help, I appreciate it.