How do I Create a button that you have to land on?

0 favourites
  • 10 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • I'm creating a platform game, and I was wondering how I would create a button that my guy would have to land on to Activate.

    Any ideas?

    Thanks in advance!

  • My guy > on collision with/is touching/is overlapping button (event) > do a thing (action)

  • overlapping

  • My guy > on collision with/is touching/is overlapping button (event) > do a thing (action)

    Do the slashes mean to make it an OR block?

  • No, those are just potential options. It's up to you which is most appropriate. Generally collision is what you want to test, but it depends if the button is a one-shot, or has to be held down.

  • No, those are just potential options. It's up to you which is most appropriate. Generally collision is what you want to test, but something.s if the button is a one-shot, or has to be held down.

    My button is a one shot button, but I want it to be pushed into the ground when my guy lands on it. I just don't know whether to make it an animation or do something else.

  • You can just move it down. Up to you.

  • You can just move it down. Up to you.

    Okay. I think I know what I wanna do! Thanks everybody!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • My guy > collides with button > set button.variable to "active"

    button.variable = "active" and button.Y is greater than the ground > button.Y = button.Y - 0.2

    button.y = ground.Y > set button.variable to "done"

    button.variable = "done" > Do something

    That's probably how I'd do it

    ~Sol

  • My guy > collides with button > set button.variable to "active"

    button.variable = "active" and button.Y is greater than the ground > button.Y = button.Y - 0.2

    button.y = ground.Y > set button.variable to "done"

    button.variable = "done" > Do something

    That's probably how I'd do it

    ~Sol

    Thanks, but I've already figured it out how I wanted to do it. Nice alternative, though!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)