4-button controller bug/error

PBEmpirePBEmpire Member Posts: 676
edited May 2013 in Working with GS (Mac)
Hey guys! I have started working on my next game, and have quickly ran into a problem. I have set up a 4-button controller, yes it is a controller game. The controller works fine. It moves the actor fine. But now the problem- when i try to click on one of the 4 buttons, left,right up or down, and drag my mouse without releasing it and go over another button, it follows suit. But when i let go of my mouse, the actor continues to move without stopping, unless i once again click anywhere on the screen or another button. However, i have created a rule to stop the actor when touch is released.

When touch is released/outside, change attribute move (direction) to false.

But the problem still occurs.

Comments

  • PBEmpirePBEmpire Member Posts: 676
    No one?
  • PBEmpirePBEmpire Member Posts: 676
    Edit: I realised that this only occurs when i drag my mouse from outside the controller to inside the controller on top of any button and then let go of my mouse. For some reason it does not detect that i have let go of my mouse.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    These kinds of questions are really hard to answer without seeing your rules. Maybe you have it set up correctly and it's just not working. Maybe you have it set up wrong.

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

  • PBEmpirePBEmpire Member Posts: 676
    @tatiang how do you take a screenshot of the rules?
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    You can google that but once you have it, see the instructions in my signature for posting it here.

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

  • PBEmpirePBEmpire Member Posts: 676
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    So I set it up as When Touch is Inside --> change game.move up to true; Otherwise change game.move up to false and I couldn't replicate your problem.

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

  • PBEmpirePBEmpire Member Posts: 676
    @tatiang
    Maybe i did not explain well enough. When you press your mouse or touch OUTSIDE the controller and without letting go of your mouse button or without releasing your finger from the screen and you drag it to any of the buttons and THEN let go, the actor continues to move. It seems like it could not detect the the finger has been lifted.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    No, I understood... I just couldn't replicate it. Maybe my demo is too simple.

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

  • PBEmpirePBEmpire Member Posts: 676
    @tatiang And it worked! But i still have no idea why the 2 different rules, which do the same thing act differently!
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    I think -- but could be wrong -- that the Touch is Released condition only triggers when you've clicked on an actor before releasing the touch. The way you described it, you clicked outside of the actor (not on it) and then released so I think it didn't register a "Touch is Released." Therefore, your Touch is Pressed made the actor move but there was no release triggered to stop the actor.

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

Sign In or Register to comment.