Limit touch to a single actor/instance.

tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
I spent way too much time figuring this out, but if it benefits someone else, it's worth it.

There may be a simpler way (oh please, oh please) but I couldn't get this to work with booleans, index counting, or game.Touches.Count. It _almost_ works without resorting to what I did, but not quite.

This -- I think -- ensures that only one answer is chosen, even if multiple actors are tapped.

The key is that each actor (or instance of an actor) must have a unique attribute. In this case, I used self.Label and then populated each instance with a value: A, B, or C. This is to simulate a quiz app.

New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Comments

Sign In or Register to comment.