Determine a part of the texture to be used for particle. The texture could have a grid of different sprite effect/object with options on how the particle will select those.
First, must provide the grid information (X,Y) to use that texture's sprite sheet, so it knows which section to use. Second, is setting which kind of mode you want to use.
Useful for setting particle once with one texture and still have effects appear randomized or in following order without seeing the same thing.
0 = random
1 = In order from right to left, top to bottom.
2 = In order from left to right, top to bottom.
3 = In order from right to left, bottom to top.
4 = In order from left to right, bottom to top.
Ex:
[PSYS_PART_SPRITE_SHEET_GRID, 5, 5, PSYS_PART_SPRITE_SHEET_MODE, 0]
Example of a sprite sheet texture for the code above.
image
The code will select one of the sprite in that texture at random each time it emits a particle item.