Question about Touch inside vs. released rule
I'm hoping I can get some guidance from the pro's around here on this subject.
I'm using some actors as simply buttons, and so far using a rule with a "touch is released" condition works pretty well. (I'm pretty new to GS, but I've equated that condition in my head to Xcode's "touch up inside" trigger).
But I've run into a problem that I've seen reported many times in my forum searching, where a "button" gets unintentionally triggered again when some other actor is "released". In most cases, the answer is to add another rule layer, including a boolean that tells the actor when it's actually been released. (stopping it from re-triggering).
For my simple "buttons", should I be using the "touch is released" rule, or "touch is inside" rule? In the scene I'm having problems with, I've got a "sell" button and a "buy" button. One sells a quantity of the player's inventory for coins, the other buys a fixed quantity for coins. And right now, with both buttons set to trigger on a "touch is released", the "buy" buttons will sometimes re-trigger as the "sell" button is being pressed.
Thanks in advance for any explanation or guidance!
Comments
Touch is pressed is best for just a simple button thats what I use, But released does the same thing you just have to release first which I Imagine a player will sooner or later.
Touch inside just means you can slide your finger from one button to the next without lifting it off the screen, which I think is best for a movement stick like a move left and right buttons, and outside is just the opposite.
Thanks BBEnk.
I've been using the "released", since it give a little more positive feedback to the "tapper". It also allows a little visual flair by using different "state" graphics (pressed, normal, etc).