Im trying to make a score tracker. I want the player to gain points for NOT COLLIDING with an actor

Im trying to make a score tracker in which the player would gain points for not colliding with another actor; how would i go about doing this? If i can't do this, is there a way to just show how long it took the player to crash with another actor?

Best Answer

  • tatiangtatiang Posts: 11,949
    Accepted Answer

    @akashthomas43 said:
    I was thinking like if the player didn't collide with one actor, that would be one point, if he didn't collide with two, that would be two points.

    But you also have to think in terms of rule conditions. "Didn't collide" isn't a condition. In fact, how would you know if the actor "didn't collide" because when an actor is on a scene and not touching another actor it is "not colliding." Would you award a point immediately? And how would you know if it "didn't collide" with two actors?

    Oh and if I do what I said above, i was thinking one point per second; and yes I'm going to reset the score after the player collides.

    Okay, so this makes more sense. If you add one point per second using a timer, then you just have to decide what to do when the actor collides with another actor (e.g. set the score to 0, subtract one point, etc.).

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Answers

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    You can use self.Time or game.Time to determine durations. As far as gaining points for not colliding with another actor, what do you have in mind (e.g. 10 points per second, 1000 points if you last 10 seconds, resetting the score after a collision, etc.)?

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • akashthomas43akashthomas43 Member Posts: 9

    I was thinking like if the player didn't collide with one actor, that would be one point, if he didn't collide with two, that would be two points.

  • akashthomas43akashthomas43 Member Posts: 9

    Oh and if I do what I said above, i was thinking one point per second; and yes I'm going to reset the score after the player collides.

  • akashthomas43akashthomas43 Member Posts: 9

    Thank you that solved my problem

Sign In or Register to comment.