Hi!
I’m making a shooting game where the hero is on the ground shooting at air enemies.
The enemies consist of a helicopter flying across the screen and out jumps several parachuters that then glides down to the ground. The hero has to kill the parachuter before it hits the ground, otherwise the parachuter lands, throws a grenade on the fence and then runs away.
The parachuter has 4 animation stages:
- Opening the parachute
- Removing the parachute while landing
- Throwing a grenade
- Running
This is how it looks like right now:
http://www.youtube.com/watch?v=q7gdtUQBGuA
For now I’ve solved the different stages like this:
First I make an object (1) with physics that just falls to the ground. I’ve set up a platform that catches the object (1), removes and nil it and then make another object (2) also with physics that falls a little bit more and then got caught up by a second platform that removes and nil it and then makes object (3) that just transition on the spot, then onComplete it calls another function that makes object (4) and transition it out of screen then removes and nil it.
When the hero shoots on the parachuter, object (1) should be removed and nil. The hero can only hit when the parachuter is falling, eg. object (1).
The problem I’m having is that I can’t nil the parachuter when I shoot it, then I get the error message:
main.lua:497: attempt to index field 'other' (a nil value)
It seems like when I make several parachuters (objects) on the same time they get the same “id” or something. The big problem is that I don’t know how to handle this whole problem. How should I do?
I’m willing to offer payment if someone can show me a solution to the whole scenario above; from making several parachuters in some sort of for-loop, to be catched up on a platform, to the transition-process.
Best regards,
joelwe [import]uid: 54640 topic_id: 27600 reply_id: 327600[/import]

I found what was wrong!! It was all in the soldierRun() function! I just changed “soldierFrags” to self and then everything just magically worked! Man, this problem has been screwing with me for months! I was about to give up! Thank you everyone for the feedback!