How do I control when destroying an object adds to score

0 favourites
  • 7 posts
From the Asset Store
Kids Game
$24.50 USD
50% off
New Sounds Added Update: 115 new sound effects added for no additional cost!
  • Basically im setting up my game so that if you press a certain button and the right time, an object is destroyed and it adds to your score.

    Now i want to set it up so that if it goes off the screen enough, it gets destroyed, but if i do this it still adds to score..how do i stop this?

  • Could you remove the score related action from the object to the event that destroys the object?

  • easily done.

    you probably did - on destroyed - add some number to score.

    what you should do is move that action (add some number to score) to event that checks if button was pressed in correct time.

    then when object is destroyed on that event of pressing button in the right time - you get the score

    otherwise you don't.

  • easily done.

    you probably did - on destroyed - add some number to score.

    what you should do is move that action (add some number to score) to event that checks if button was pressed in correct time.

    then when object is destroyed on that event of pressing button in the right time - you get the score

    otherwise you don't.

    I'm not quite sure how to do that though, because of the way the game is played.

    Basically a spawner to the right is spawning the objects and they're scrolling to the left, this is one object with 7 different frames of different colors, and when its spawned it chooses a random color to be. Now when player clicks on a color, any oof that object thats the same color will be destroyed, leaving the rest.

    heres a refference photo if it helps

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • How are you doing the destroying?

    Which events/conditions do you use?

    Could you add a is on screen condition to the on destroyed event maybe?

  • heres a refference photo if it helps

    try:

    Example.capx

  • >

    >

    >

    > heres a refference photo if it helps

    >

    try:

    Example.capx

    I feel i should mention that ur "example" looks better than my game .-. XD

    and that worked so thank you very much =3

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