Adjacent Actors
MohboDesigns
Member Posts: 13
Hey guys. New to GameSalad and have a question. I am working on a puzzle where when you select an actor, adjacent actors that have a similar attribute (i.e. color or value) need to also select. Can someone point me in a helpful direction? Thanks!
Chad
Best Answer
-
tatiang Posts: 11,949
You would store each actor's value/color in a table cell in a grid layout and then check whichever surrounding cells you are interested in.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Answers
Let me be more specific. I have actors spawning onto a grid. The idea is that tapping an actor should trigger a selection attribute. What I want is for any other actors within a perimeter of the selected actor who share the same color or number value to also trigger as selected.
Is this only possible by directly referencing each other inside the scene?
BAM! Of course the answer is in tables! I have just recently started trying tables out. Thanks!