Convert list contents to a single string for comparison.

Korehepard

  • Posts: 1
I need assistance finding out how to build this functionality. Assume I have a list or array containing {A, F, H, I, L} and want to construct a value/attribute of some type to keep the contents of that list in a single string or merge them into another list as a single string, forming "AFHIL". I am having problems figuring out how to make this happen.

The general purpose is to add letters to a list one at a time, then compare the whole list to a single item from another list.
List 1: {D, O, G} -> DOG (place somewhere) and then compare with entry in another list List 2 (Position X): "DOG".

Luyren

  • *
  • Posts: 2807
Code: [Select]
text attribute
for each item in list
--text = text & item
Text will have all the items as strings concatenated.
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.