Newbish Question

This forum is currently in read-only mode.
From the Asset Store
Logo Quiz with 150 prepared logos and answers, automatic question and answer mixing
  • Alright, forgive me, I'm a bit of a newbie here.

    I'm making this little game where you race a car around a track, and try to get the best lap time. It's basic. Anyways, I have a start/finish line. I have it set up so each time the car runs over the line, it makes the car's private variable 1.

    Anyways, after running debug mode, I noticed every time the car would pass the finish line, the variable would stay at 1. I want it to (each time the car passes) INCREASE the variable by one. I tried +1, but that doesn't work. -1 does, though. What do I need to do to increase the variable by one each time the car passes over (collides) with the finish line?

  • Are you using add to variable, subtract from variable or set variable?

    IF you are using add, then +1 will work

    IF you are using subtract, then -1 will work

    IF you are using set, then you will need to set it up something like this,

    Car passes start-Set Variable1 to "Variable1+1"

    You need to include the variables current value or each time it will be set to 1.

  • Ohhh. Wow, I feel stupid. Thanks man!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • We all do though u never can match Sagalism that means ultimate stupid questions over chat when doing crappy game.

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