# AddParticlesForce

## Description

Adds a force that will act at a given time in every particle's life. For example a force set to start at time 2 and end at time 3 will start influencing particles when they have been alive for 2 seconds. It will continue to act on those particles until they have been alive for 3 seconds. The force's influence is defined by an x and y value that represent acceleration in units per second. For example a force with x=5 will adjust a particle's horizontal speed by adding 5 units for every second the force is active, if the force is only active for 0.5 seconds the particle would then be moving 2.5 units per second faster towards the right. Multiple forces can be acting on a particle at the same time if their timings overlap.

## Definition

AddParticlesForce( ID, starttime, endtime, x, y )

void agk::AddParticlesForce( UINT ID, float starttime, float endtime, float x, float y )

## Parameters

- ID - The ID of the emitter to modify.
- starttime - The time in a particle's life at which this force should start having an effect.
- endtime - The time in a particle's life at which this force should stop having an effect.
- x - The x component of the force's influence on a particle's speed in units per second.
- y - The y component of the force's influence on a particle's speed in units per second.