Creates a particle system instance.

hgeParticleSystem *SpawnPS(
  hgeParticleSystemInfo *psi,
  float x,
  float y


Pointer to a valid hgeParticleSystemInfo structure, describing the particle system.
Screen x-coordinate.
Screen y-coordinate.

Return value

If succeeded returns pointer to the created particle system, otherwise returns 0.


The maximum number of simultaneously allowed particle systems within one manager is 100. If you try to create more particle systems, SpawnPS will return 0.

The manager monitors a particle system created by SpawnPS method and removes it from memory as soon as it is stopped (either manually or because of it's life time have passed) and all it's particles are dead.

If you want to access the particle system via the pointer returned by SpawnPS, you should first ensure that the pointer is valid with IsPSAlive method. Also, don't delete the returned pointer manually, this may cause system crash.


Header: hgeparticle.h
Import library: hgehelp.lib

See also

IsPSAlive, KillPS