collision detection please help ..

as7494as7494 Member Posts: 70
edited November -1 in Working with GS (Mac)
Sorry for posting this so many times, however I havent been able to get an answer. I really need to get my actors of the same actor"type" to register individual collisions with another actor to update the score. Ive tried using different actors, creating a rule to change an integer value (+1,-1), however none of these methods worked to successfully change the score as the actors collided with the other actor. Thank you for you help.

Comments

  • beefy_clyrobeefy_clyro Member Posts: 5,394
    Ok, this should go something like this;

    New Game attribute, lets call it - Score.

    So as an integer, you now have game.score

    You then need your 2 actors, lets call 1 player and the other 1 enemy.

    In player, you'll have a rule that says;

    When overlap or colliding with enemy
    Change attribute game.score to game.score + 1 (use whatever number you want)

    You get into the attributes by using the little 'e' symbol which opens up the expression editor.

    You'll then want another actor that has a display text behaviour, in this, click the 'e' and select game.score

    Hope that helps

    Cheers
  • as7494as7494 Member Posts: 70
    yea, but that doesnt track multiple instances of the same actor, and when the player leaves the collision with the enemy it doesnt register as back to a 0. I tried using the otherwise part of the rule to set the attribute to a -1, however it didnt work. If i have one actor class but many individual ones of that same one how can i make those register?
Sign In or Register to comment.