Need help with applyForce

I have an eventListener when triggered appliesForce(). My issue is, how do I know when an object that was thrown through applyforce has fully stopped moving so that I can reset it’s piece, or can I let the game somehow know that the eventListener was triggered so it can call a function to reset the game piece. An onComplete would be nice like the transitions have.

Please help

Thanks [import]uid: 7197 topic_id: 4004 reply_id: 304004[/import]

have a local array variable in your file of objects that get forces applied to them. ie when you apply a force to an item do this

[lua]_forcedObjects[%_forcedObjects+1] = myForcedObject [/lua]

then in your Runtime enterframe, if %_forcedObjects > 0, loop through _forcedObjects (backwards so you can remove safely) and check if any objects have come to rest (presumably LinearVelocity will be close to 0), do whatever you need to that object and then remove it from the array with table.remove

[import]uid: 6645 topic_id: 4004 reply_id: 12120[/import]