# Spawning particles

To configure and spawn particles, create  a `DataAsset` from `DA_EFS_ParticleSystem`.

Once  created the data asset can be added to your component.

<figure><img src="https://1114327333-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPDAn56YPaXrBOaYKWGxY%2Fuploads%2FHvIY0UMZDBmc1bxO2dVX%2Fimage.png?alt=media&#x26;token=989af9ed-26b7-473a-80c1-e86d9540f4d6" alt=""><figcaption><p>You can add particle data assets directly from the component</p></figcaption></figure>

Alternatively you can add and remove Particle Data Assets in runtime using `AddStepParticleData` and `RemoveStepParticleData`.

### Content of the Decal Data Asset.

* **Affected Surfaces**: Set the desired surface types for the particles to spawn on. Multiple surfaces can be added here.
* **Niagara System**: Set the niagara system to spawn at the step location.
* **Speed to Spawn**: The system will not be spawned outside of this speed range.
* **Auto Attach**: Attachs the particle system to its instigator.
* **ShouldUsePool**: Pooling the system will prevent the spawn of a new system for each step, and will instead reuse the same one. (your system should not deactivate itself)

### Default Niagara variables

By default the component will try to set variables in your Particle System in case you want to use them.

* (float) **StepSpeed** -> Gets the component owner's velocity in float.
* (Vector3) **StepVelocity** -> Gets the component owner's velocity.
* (Vector3) **StepForward** -> Gets  the component owner's forward vector.
* (Vector3) **StepLocation** -> Gets the step location in world space.

### More advanced uses

For more advanced uses, you can override `OnParticleSpawned` both in Blueprint and C++ to add custom code when a particle sytem is activated.

<figure><img src="https://1114327333-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPDAn56YPaXrBOaYKWGxY%2Fuploads%2Fl25tKUwaFUQZpSEw7biJ%2Fimage.png?alt=media&#x26;token=798a217e-f65a-41cc-b78d-efbeff550d18" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://maxestla.gitbook.io/easy-foot-step-documentation/advanced-options/spawning-particles.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
