Need to create a better 'favourite' system
beefy_clyro
Member Posts: 5,394
Ok, so i'm having one of those weeks where I seem incapable of figuring out anything .. ok so i'm exaggerating .. but only slightly!
Anyway, in my app i'm pulling data from my own server and then spawning the relevant row numbers as actors. These actors cover the width of the screen and is in the swipey/coverflow method list.
This is all automatic and there positions are all calculated automatically and placed where they need to be. I give the option to the user to 'favourite' any of these actors. I originally thought I could just put a star on that gets touched etc but the problem is, I have a when touch is released rule open url … So therefore, when a user touches that star, it would open the url at the same time.
Currently I have a hold down for > 1 second and it favourites it. This works fine but only if the user swipes as they let go (as touch needs to be inside to trigger the open url), however, if they favourite it and don't swipe, it opens the url … This is annoying and if possible, I just want it to only open the url if you just tap and release.
I have tried a self count and this must be 0 when touch is released, then just resetting the count to 0 a moment after letting go, this then just delays the opening of the url until that value is set back to 0.
So as of right now, i'm stumped!
Thanks
Anyway, in my app i'm pulling data from my own server and then spawning the relevant row numbers as actors. These actors cover the width of the screen and is in the swipey/coverflow method list.
This is all automatic and there positions are all calculated automatically and placed where they need to be. I give the option to the user to 'favourite' any of these actors. I originally thought I could just put a star on that gets touched etc but the problem is, I have a when touch is released rule open url … So therefore, when a user touches that star, it would open the url at the same time.
Currently I have a hold down for > 1 second and it favourites it. This works fine but only if the user swipes as they let go (as touch needs to be inside to trigger the open url), however, if they favourite it and don't swipe, it opens the url … This is annoying and if possible, I just want it to only open the url if you just tap and release.
I have tried a self count and this must be 0 when touch is released, then just resetting the count to 0 a moment after letting go, this then just delays the opening of the url until that value is set back to 0.
So as of right now, i'm stumped!
Thanks
Comments
When touch is pressed
Change attribute game.clickingStar to true
[favorite the cover somehow]
Otherwise
Change attribute game.clickingStar to false
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Would be so much simpler if GS checked if all attributes were met when the touch was first released, not if they ever become met several seconds later!
In the attached demo there is a rule When touch is released and self.value=2 --> destroy. self.value starts at 1 and when you press the '2' key on the keyboard, it changes to 2. I wish that the rule would only fire if you pressed 2 before (or at the same time) as clicking, but instead it works even if you release the click/touch... wait a few seconds... and then press 2.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User