# SetParticlesMax

## Description

Sets the maximum number of particles that will be emitted. If this value is equal to -1 then the number is infinite. The emitter will keep a count of the number of particles it emits and stop when the limit is reached. To check if the emitter has reached its limit use GetParticleMaxReached. To reset the count and make it start emitting again use ResetParticleCount.

## Definition

SetParticlesMax( ID, max )

void agk::SetParticlesMax( UINT ID, int max )

## Parameters

- ID - The ID of the emitter to modify.
- max - The maximum number of particles to emit