Hi all. I’m struggling with a game-logic concept that’s been frying my brain for the past couple of hours:
I have a single game ‘character’ that I would like to fire different events on multiple collisions with the same object, here’s an example; A car (character) bumps into a wall (object) and sustains damage, for argument’s sake, let’s say a ‘swap image event’ within the ‘car object’ (a more beaten up fender for example). The problem I’ve got is counting the individual collisions that are happening to the same car. So, the car crashes into the wall, a collision occurs and fires the function ‘local GetBeatenUpFender = function (event)’ - Just an example not specified syntax. The car hit’s the same wall again and I’d like to add a ‘MORE’ beaten up fender. I just don’t know how I would count the number of collisions, in order to know what level of damage has been sustained.
If there’s a piece of sample code out there that someone is aware of, I’d appreciate the pointer, in fact, any pointers at all.
It’s probably a really twisted way of explaining a simple concept, sorry if it’s unclear, I’ve done my best.
Mark [import]uid: 176868 topic_id: 34985 reply_id: 334985[/import]