Need to create a better 'favourite' system

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

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    You could add a boolean condition to the cover flow actors and only allow movement/selection of them if game.clickingStar is false. And then in the star actor do:

    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

  • beefy_clyrobeefy_clyro Member Posts: 5,394
    @tatiang That was my original thinking, however, as soon as you switch the game.clickingStar back to false, it then registers and opens the touch released part!
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    I think I now have a version of that working above adding an extra self attribute in and embedding within a timer!
    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!
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    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!
    This, 1000 times. We already have mouse is up so the touch is released condition should only be true if it was just released.

    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

  • beefy_clyrobeefy_clyro Member Posts: 5,394
    Exactly that! Rather annoying and frustrating, especially when like you said, we have when mouse button is up! I know its only a small thing that I rarely come need a dirty workaround but will see if @CodeWizard or @BlackCloakGS would be interested in changing it to behave as it should.
Sign In or Register to comment.