Actor recieves event 'mouse button' is 'down' issue

GuardianGuardian Member Posts: 54
edited January 2012 in Working with GS (Mac)
Hi guys,

I have a simple drag and drop mechanic. It would seem no matter where I press the mouse down it triggers the actor recieves 'mouse button' is 'down' event.

Is this a known bug?

-Guardian

Comments

  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    Not a bug. You will need attributes for this to work properly. Try the method in this video….If you haven't already, that is.

  • GuardianGuardian Member Posts: 54
    edited January 2012
    I have an attribute already setup. My method is the same as in the video.

    The problem I am having is that no matter where I mouse down it moves the actor to the mouse pointer. i.e. I mouse down on a non-relevant actor and the 'drag and drop' actor is moved to the mouse position.

    It would appear that the event is firing on just 'mouse down'. Whereas it should fire on 'mouse down' && 'mouse over actor'.
  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    edited January 2012
    Can you post a screenshot of your rules you have set up?

    I'm using this method for my current game, and it works fine for me, so I don't think it's going to be a bug or anything, probably just something simple that got overlooked…hopefully :)
  • ChobbifaceChobbiface PRO Posts: 491
    Are you making this app for the iPhone/iPad? In that case, you might wanna try when touch is pressed/inside rather than 'mouse down'.
  • GuardianGuardian Member Posts: 54
    I am making it for iPad, but thought using the mouse for testing it on the PC would be ok. Is this not the case?
  • App SurgeApp Surge Member Posts: 651
    edited January 2012
    Make sure the rule looks like this:
    When All conditions are valid:
    Actor receives event mouse button is down
    Actor receives event mouse position is inside.

    And then put the behaviors in that.

    Good luck!
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    As redsky said, you can use mouse button is down AND mouse position is inside, but I prefer to just set the condition to Touch is Pressed, which works as you'd expect it to with a mouse button or on a touch device. Mouse button is down just means that the mouse button was clicked _anywhere_ on the scene, which isn't all that useful unless that's the condition you actually want!

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

  • ExteriorExterior Member Posts: 5

    Thanks for the help I had the same question

Sign In or Register to comment.