<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE funcs
  SYSTEM '../../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs>
  <func>
    <title>CreateParticle</title>
    <category>Particle</category>
    <version>5.1 OC</version>
    <syntax>
      <rtype>bool</rtype>
      <params>
        <param>
          <type>string</type>
          <name>szName</name>
          <desc>Name of the particle</desc>
        </param>
        <param>
          <type>int</type>
          <name>x</name>
          <desc>X coordinate of the particle. Offset in local calls.</desc>
        </param>
        <param>
          <type>int</type>
          <name>y</name>
          <desc>Y coordinate of the particle. Offset in local calls.</desc>
        </param>
        <param>
          <type>int</type>
          <name>xdir</name>
          <desc>Initial horizontal velocity of the particle.</desc>
        </param>
        <param>
          <type>int</type>
          <name>ydir</name>
          <desc>Initial vertical velocity of the particle.</desc>
        </param>
        <param>
          <type>int</type>
          <name>a</name>
          <desc>Extra parameter. This is usually the size of the particle in 1/5 pixels.</desc>
        </param>
        <param>
          <type>int</type>
          <name>b</name>
          <desc>Extra parameter. This is usually the color modulation of the particle.</desc>
        </param>
        <param>
          <type>object</type>
          <name>target</name>
          <desc>Target object for object local particles. Object local particles are drawn directly on top of the object and are removed when the object is deleted.</desc>
          <optional />
        </param>
        <param>
          <type>bool</type>
          <name>behind_target</name>
          <desc>If specified and not <code>false</code>, the particle is drawn directly behind the target object.</desc>
          <optional />
        </param>
      </params>
    </syntax>
    <desc>Creates a particle. The named particle definition must be loaded. For more information see the particle documentation.</desc>
    <remark>This function returns <code>false</code> if the particle definition was not found, otherwise <code>true</code>. There is no return value indicating whether the particle has actually been created. This must be so to prevent synchronization problems in network games, as particles may be handled differently on each computer in the network.</remark>
    <examples>
      <example>
        <code>CreateParticle(&quot;Blast&quot;, 0,0, 0,0, 100, <funclink>RGB</funclink>(128,128,255));</code>
        <text>Creates a blue explosion at the position of the calling object.</text>
      </example>
    </examples>
    <related>
      <funclink>PushParticles</funclink>
      <funclink>ClearParticles</funclink>
    </related>
  </func>
  <author>Sven2</author><date>2002-04</date>
</funcs>
