How do I create an If Statement with Lists?

ozz

  • *
  • Posts: 573
I some behaviors I only wish to trigger when an item on a list is Complete.  How can I set up the blocks for this sort of If Statement?

Justin

  • *
  • Posts: 4636
Not sure what you mean by an item on a list being complete. Might help to expand on that.
For Live Support: Join our discord server and ping me @justin.
I'm most often available between 10am and 10pm Japan time. (GMT+9)

ozz

  • *
  • Posts: 573
Yes, sorry about that I'm still having trouble understanding how lists work.  I should have said when the 'Text' from a discrete line on a list reads "complete".  Included are some IF Statements that already exist in the game.  Ideally I'd like to be able to do that with the text from the list.

Justin

  • *
  • Posts: 4636
You can use the [get item # [_index_] from [_list_]] block to retrieve the value of an item in the list, and then use the <[_anything_] = [_anything_]> block to check if that's equal to the word complete.

if <[ get item # [ 0 ] from [ my list ] ] = [ complete ]>, for example.
For Live Support: Join our discord server and ping me @justin.
I'm most often available between 10am and 10pm Japan time. (GMT+9)

ozz

  • *
  • Posts: 573
Thank you. I tried several veneration on the image included, but it does seem to work.  Did I build the block wrong? 

Justin

  • *
  • Posts: 4636
That looks correct, but it depends on you setting up the list with the correct data in the first place as well.

Try looping over the list and printing each item to make sure the list contents are what you expect.
For Live Support: Join our discord server and ping me @justin.
I'm most often available between 10am and 10pm Japan time. (GMT+9)

ozz

  • *
  • Posts: 573
Thanks, I'm not sure it is in the right place.  I'm quite new to lists, but I believe the "Complete" is related to a Key and there are some blocks used that come from the 'Maps' tab.  Beyond that I don't really understand how to check for 'Keys' or Placement on a list.  How can I discover what place  "Complete" is in?

svintaj

  • *
  • Posts: 311
Not tested but this should work, it's the basic principle.