Since the creator of the API knew only a little lua (yes, @Simon), the API quickly became ugly Post here some snippets you use in your code. You can use http://mniip.com/qp/ , just make sure to tick the 'Lua code' checkbox Let me begin: http://mniip.com/qp/f0000004C.html Creates an iterator, which iterates over all particles