# part_type_size

## Sets the minimum and maximum start size of the particle type.

### 语法：

part_type_size(ind, size_min, size_max, size_incr, size_wiggle);

ind The index of the particle type to change.
size_min The minimum size the particle can start at.
size_max The maximum size the particle can start at.
size_incr How much the particle should increase or decrease per step.
size_wiggle How much should randomly be added or subtracted from the particles size per step.

### 描述

This function is used to determine the size of the particle when it is created and can also be used to make the particle increase or decrease in size over its lifetime. The minimum and maximum size values default at 1 (meaning that the size is the same ratio as the base particle after the part_type_scale scale has been set) and if they are set to the same value, the initial size for all particles will be the same, but if set to different values, each particle will start with a random size from within the range, for example if you have a minimum of 0.5 and a maximum of 2, all particles will be created with a size between half and double the base scale.

You can also set an increment value that will make the particle sprite grow (if a positive number) or shrink (if a negative number) over the lifetime of the particle, with the given amount being added to the particle size each step. This value can be a minimum of (+/-)0.01.

Finally, you can set the "wiggle" factor. This is a value that will be added or subtracted randomly to the size each step of the particles lifetime. Obviously larger values are more pronounced than smaller ones, and this value can even be a negative with the maximum range being between -20 and 20.

### 例如：

part_type_shape(particle1, pt_shape_explosion);
part_type_size(particle1, 2, 2, 0.10, 0.01);
part_type_scale(particle1, 1, 1);
part_type_colour2(particle1, 16777215, 12632256);
part_type_alpha3(particle1, 0, 0.20, 0);
part_type_speed(particle1, 0.20, 0.20, 0, 0);
part_type_direction(particle1, 0, 359, 0, 20);
part_type_orientation(particle1, 0, 359, 0, 0, 1);
part_type_blend(particle1, 0);
part_type_life(particle1, 40, 60);

The above code will set various particle values including the size which is set to double the size when each particle is created, and then increment the size by 0.01 each step with a wiggle of 0.1 too.