Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | mattkw80 |
Some folks here helped my get my list of NPC ‘memories’ going - and now I’m hoping I can get help keeping these Nodes unique.
‘Memories’ can be thought of like items of inventory… apple, sword, rock, etc.
They are - ‘nodes’ but really just simple instances from the simple Memory Class I made.
NPC
+Memories (Node2d)
++Memory1
++Memory2
++Memory3
When I loop through them, how should I approach finding duplicates and pursing them?
ie: If Memory1 and Memory3 are both “I seen an apple the other day”… can someone help me with logic of iterating through and killing Memory1 because Memory3 is the same thing?