How to check whether my player touch a certain object?

Discussion in 'Programming' started by Best2plays, Aug 14, 2019 at 7:08 AM.

  1. Best2plays

    Best2plays Member


    Based on the title, I need some help. I'm using gamemaker 8.1 lite. My game is a 2 player basketball game, each player have a certain button which changes sprite to show it blocking (player 1 = key "V", player 2 = key "L") Since there is 2 players but 1 ball, I been trying to check whether which player touches the ball to block with the ball (raising their arms in the air) Basically what I'm trying to do is that, if player 1 touch the ball (ball gets destroyed, player sprite changes to one with ball), when pressing the "V" key, player 1 will raise his hand in the air with the ball. And since player 1 touch the ball and not player 2, I want to get player 2 to raise his hand without the ball when pressing the "L" key.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice