er2.getPropPositions 4

Available from Easy Red 2 2.1.1

Fills a Lua table with the positions of every map prop of a given kind inside a circle. propType is the type recorded in the prop database: environment, terrain, streets, buildings, props, vehicles, items, weapons. Handy to place objectives on actual buildings.


Return value

Return TypeDescription
NumberHow many positions were written into the table.

Parameters

ParameterTypeDescription
1voidCentre of the circle to search in.
2NumberRadius of the circle, in metres.
3stringThe prop type to look for: environment, terrain, streets, buildings, props, vehicles, items, weapons.
4TableAn empty Lua table. It is filled with the positions found.
5NumberOptional, default 400. Stops the search once this many props have been collected, so a dense map cannot stall the script.

Examples

No examples available.


Back to Scripting API