---
title: numParticlesToEmit
framework: spritekit
role: symbol
role_heading: Instance Property
path: spritekit/skemitternode/numparticlestoemit
---

# numParticlesToEmit

The number of particles the emitter should emit before stopping.

## Declaration

```swift
var numParticlesToEmit: Int { get set }
```

## Mentioned in

Creating Particle Effects

## Discussion

Discussion The default value is 0, which indicates that emitter creates an endless stream of particles. If a non-zero value is provided, then the emitter stops generating particles after it has created the specified number of particles.

## See Also

### Controlling When Particles Are Created

- [advanceSimulationTime(_:)](spritekit/skemitternode/advancesimulationtime(_:).md)
- [resetSimulation()](spritekit/skemitternode/resetsimulation().md)
- [particleBirthRate](spritekit/skemitternode/particlebirthrate.md)
