How do I pick the last object

0 favourites
  • 5 posts
From the Asset Store
Show your master of martial arts by killing all flies empty handedly!!!
  • Hello. Im trying to pick the last created object but i can't seem to make it work.

    I have a global variable Ballz. which is at 1 at startup, when the player clicks the ball is dropped and if the ball hits a ring, 1 is added to the Ballz variable, that way the player can keep going till he/she runs out of luck.

    Question 1 is: how do i target the last dropped ball ?

    Question 2 is: how do i detect when the ball isn't bouncing anymore ?

    Hint: The game is over when the ball isn't bouncing anymore.

  • system condition: pick nth instance: ball.count-1

    that will pick the last instance that was created.

    To detect is ball isn't bouncing, depends how your bouncing is implemented. How is your bouncing implemented?

  • system condition: pick nth instance: ball.count-1

    that will pick the last instance that was created.

    To detect is ball isn't bouncing, depends how your bouncing is implemented. How is your bouncing implemented?

    Using Physics on my ball with the Elasticity set to 0.8.

  • I don't use the default physics in construct, so I'm not sure. I checked and it looks like there isn't a simple method for detecting that.

    If you use Chipmunk physics behavior, there are conditions and expressions for checking if an object is colliding, and other stuff, which would make it easier to determine what the object is doing.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I don't use the default physics in construct, so I'm not sure. I checked and it looks like there isn't a simple method for detecting that.

    If you use Chipmunk physics behavior, there are conditions and expressions for checking if an object is colliding, and other stuff, which would make it easier to determine what the object is doing.

    Allright. Thanks a bunch for the help. Much appreciated.

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