Select Sprite for ParticleSystem
tracked
Vincent Nacon
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.

The code will select one of the sprite in that texture at random each time it emits a particle item.
Log In
Talia Tokugawa
Love this idea but as was suggested in another of your particle related submissions llParticleSystem is key value pairs so could I suggest/add:
*
PSYS_PART_SPRITE_X
: (integer)
horizontal number of sprites.*
PSYS_PART_SPRITE_Y
: (integer)
vertical number of sprites.*
PSYS_PART_SPRITE_START
: (integer)
Starting frame.*
PSYS_PART_SPRITE_DIR
: (integer)
start direction 1=up, 2=right, 3=down=left;*
PSYS_PART_SPRITE_END
: (integer)
Ending frame.*
PSYS_PART_SPRITE_MODE
: (flag)
-
PSYS_PART_SPRITE_LOOP
: (boolean)
on reaching end of row/column:- TRUE: go to opposing side.
- FALSE: stay on this side (snake mode).
-
PSYS_PART_SPRITE_PINGPONG
: (boolean)
on reaching END frame:- TRUE: reverse direction.
- FALSE: go to start frame.
-
PSYS_PART_SPRITE_BURST
: (boolean)
Change sprite per- TRUE: burst.
- FALSE: particle.
-
PSYS_PART_SPRITE_RANDOM
: (boolean)
Picking of sprites:- TRUE: Randomly from between START and END.
- FALSE: Sequential.
I think this might cover most potential use cases. One significant thing this would provide is you could target single sprites within the sprite sheet which would be great for caching especially relevant given the 2048 textures announcement.
Spidey Linden
tracked
Issue tracked. We have no estimate when it may be implemented. Please see future updates here.