Urgent help please! Two objects hit at exactly same time - How to get specific event.force?

Hi,

I have a problem i can not fix - it’s been beating me for 4 days! I have looked into this a lot and have defined the problem as such.

If my bullet hits two items at exactly the same time, it causes my use of event.force to create the users score to fail.

It appears that my postCollision event is not able to collect the event.force value correctly if two items are hit together, as though it can’t collect the right value?

Is there any way i can get the specific event.force for a individual object?

The problem i have only occurs on Android.

Thanks [import]uid: 125592 topic_id: 29555 reply_id: 329555[/import]

In your postCollision listener try printing these values…

print( event.object1.force, event.object2.force)

I haven’t used a postCollisions listener in quite a while but i’m pretty sure you can get values for both of the objects taking part in the collision. [import]uid: 69826 topic_id: 29555 reply_id: 118625[/import]

Thanks for taking the time to help me - it’s really really appreciated.

I’ve given this a try but it’s throwing up the following error

attempt to index field ‘object1’ (a nil value)

any ideas?

Thanks again [import]uid: 125592 topic_id: 29555 reply_id: 118628[/import]

Hmmm… according to the documentation object1 and object2 should work just fine. E.g.
http://docs.coronalabs.com/api/event/postCollision/object1.html

Is your postCollision listener set up in the same/similar to that shown in the link? [import]uid: 69826 topic_id: 29555 reply_id: 118630[/import]