keeping score with collisions
by rennie moffat · in Torque Game Builder · 02/10/2010 (4:15 pm) · 2 replies
Hi, I am using a variation of the astroids scoring behaviors,
however, I want to trigger a score of x value on collision, the problem is, that my collision lasts longer than an instant SO the compiler adds a score, adds a score, adds a score until the collision is over.
Currently the collision takes place between a stationary object and a falling object. I am obviously going to have to put my mind to this some more but if anyone has any ideas of how to make a score count only for the instant a collision happens. I have tried safeDelete, but that is not good as I need the object that would be deleted, I have tried setPosition() but it did not work. I need to somehow only allow the falling object and the stationary object to register one instant of a touch.
however, I want to trigger a score of x value on collision, the problem is, that my collision lasts longer than an instant SO the compiler adds a score, adds a score, adds a score until the collision is over.
Currently the collision takes place between a stationary object and a falling object. I am obviously going to have to put my mind to this some more but if anyone has any ideas of how to make a score count only for the instant a collision happens. I have tried safeDelete, but that is not good as I need the object that would be deleted, I have tried setPosition() but it did not work. I need to somehow only allow the falling object and the stationary object to register one instant of a touch.
About the author
My thanks to Garage Games and the Garage Games Community combined with owned determination I got one game up, Temple Racer and I am looking to build more interesting, fun games for the mass market of the iOS app store.
Torque Owner Scott Cameron
now if you need the objects stay alive in the game after the collisions happen then you would have to find a way to reset the bool after a certain ammount of time or something similar