So, I'm having a problem adding to my score whenever I collide with something.
First of all, here's my collision code (using Sparky's Collision)-
q=SC_sphereCastGroup ( 2, object position x (2), object position y (2)-50, object position z (2), object position x (2), object position y (2)+50, object position z (2), 1, 0 )
if q>0
`repositioning the object that we're colliding with so that it will be out of the way
position object q,10000,10000,10000
hide object q
`adding one point to the score
score=score+1
endif
Basically, whats happening is that instead of adding just 1 to the score, it's adding 1 to 10 to the score. Now, I'm assuming that this is because it's constantly colliding with the object (which is a coin, by the way) for a few frames (proper DBPro terminology?). I was hoping to simply avoid this by repositioning the object before adding the score, but this didn't work.
So, how would I got about making sure it adds only 1 point to the score? I came up with a little "trick" using a "lastscore" variable, but I think it was a lot of math going on each step when there's probably an easier way. So, I come to you
Thanks for any help you can give!
PS : Sorry for the bad topic title, but I couldn't think of anything better, haha