0 Favourites

How do I pick the last object

  • 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.

  • Construct 3

    Buy Construct 3

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

    Buy 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.

  • 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)
Similar Topics Posts Views Last Post
Unread hot topic
99 10,159
karshinkoff's avatar
karshinkoff
Unread hot topic
167 14,518
DMT2005's avatar
DMT2005
Unread hot topic
123 14,877
Zebbi's avatar
Zebbi