When collide or overlap score+1

I made it so when a ball overlaps or collides with actor 2 it will change attribute to score plus one. But when only one actor goes through actor 2 it adds like 6,7,8 or 11 points to the score instead of 1. Why is this happening? Thank you for the help.

Best Answer

  • 2create2create Posts: 90
    Accepted Answer

    Because it collides many times. To prevent it you need to use next logic:

    Create boolean variable: AddPoint

    Create rule:

    If (AddPoint == true) {
    Score = Score+1;
    Set timer (after 0.5 sec) {
    AddPoint = false:
    }
    }

    When colliding object set:
    AddPoint = true;

    Yops – the innovative puzzle game for iOs – http://apple.co/1ESvIlC
    Other games - http://appstore.com/flashpromllc/

Answers

  • SocksSocks London, UK.Member Posts: 12,822

    @Cowuniverse said:
    Why is this happening?

    Because of the way you have set up all your rules and behaviours and attributes (and so on).

Sign In or Register to comment.