Changes between Version 2 and Version 3 of ParticleFormat


Ignore:
Timestamp:
Apr 9, 2011, 3:07:46 PM (13 years ago)
Author:
Philip Taylor
Comment:

mention particle actors

Legend:

Unmodified
Added
Removed
Modified
  • ParticleFormat

    v2 v3  
    4040</particles>
    4141}}}
     42
     43Particle files supporting '''hotloading''': if you edit the XML while the game is running, it should automatically reload the file and start rendering the new effect when you switch back to the game. (Note the game is usually paused when its window is not focused, so the new animation won't play until you re-focus the window.)
    4244
    4345All effect files must specify a texture and '''blend mode'''. The blend mode controls how each particle is drawn on top of the background, and is one of the following:
     
    8587Currently they're very limited so the only thing you can do is:
    8688 * '''`<force x=`"'''''number'''''`" y=`"'''''number'''''`" z=`"'''''number'''''`"/>`''' - each particle will be subjected to a constant acceleration force (in metres per second per second) in each direction. Each attribute will default to 0, so typically you can just write e.g. `<force y="-2.5"/>` to get downwards acceleration (simulating gravity).
     89
     90== Using particles ==
     91
     92To make use of particle effects in the game, you have to create an actor that links to them. An actor XML file like
     93{{{
     94<?xml version="1.0" encoding="utf-8"?>
     95<actor version="1">
     96  <group>
     97    <variant name="Base">
     98      <particles file="flame.xml"/>
     99    </variant>
     100  </group>
     101  <material>basic_trans.xml</material>
     102</actor>
     103}}}
     104will typically be sufficient. You can then use that actor directly in the game, or as a prop attached to a prop-point on another actor.