浏览代码

Added short section on how to control effect from script.

Mikael Säker 7 年之前
父节点
当前提交
be11efb4e3
共有 1 个文件被更改,包括 14 次插入0 次删除
  1. 14 0
      docs/en/manuals/particlefx.md

+ 14 - 0
docs/en/manuals/particlefx.md

@@ -204,3 +204,17 @@ Magnitude
 
 
 Max Distance
 Max Distance
 : The maximum distance within which particles are affected at all by this modifier. Only used for Radial and Vortex.
 : The maximum distance within which particles are affected at all by this modifier. Only used for Radial and Vortex.
+
+## Controlling a particle effect
+
+To start and stop a particle effect from a script:
+
+```lua
+-- start the effect component "particles" in the current game object
+particlefx.play("#particles")
+
+-- stop the effect component "particles" in the current game object
+particlefx.stop("#particles")
+```
+
+See the [Particle FX reference documentation](/ref/particlefx) for more information.