Newbish Question

New releases and general discussions.

Post » Mon Jun 15, 2009 7:19 am

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?
B
2
G
3
Posts: 3
Reputation: 856

Post » Mon Jun 15, 2009 8:02 am

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.
B
9
S
2
G
4
Posts: 346
Reputation: 2,726

Post » Mon Jun 15, 2009 8:30 am

Ohhh. Wow, I feel stupid. Thanks man!
B
2
G
3
Posts: 3
Reputation: 856

Post » Mon Jun 15, 2009 9:59 pm

We all do though u never can match Sagalism that means ultimate stupid questions over chat when doing crappy game.
B
11
S
3
G
4
Posts: 622
Reputation: 3,186


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 1 guest