Lua API:Simulation

From The Powder Toy
Revision as of 14:19, 22 February 2013 by Simon (talk | contribs) (Begin document)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The Simulation API allows for modifying the state and properties of particles, air and gravity

Methods

simulation.partNeighbours

number ... sim.partNeighbours(number x, number y, number radius, [number type])

Returns a list of particles indexes that neighbour the given coordinates that matches the given type (if it is specified) The resulting list does not contain the "origin particle"