Create particles from a system at a given position and with a given colour.


part_particles_create_colour(ind, x, y, parttype, colour, number);

参数 描述
ind The index of the particle system.
x The x coordinate of where to create the particles.
y The y coordinate of where to create the particles.
parttype 所创建的粒子索引(类型)。
colour The colour blending for the particles.
number 要创建粒子的数量。

返回: N/A(无返回值)


This function is ideal for those effects that do not require any of the functionality offered by particle emitters (for example, to create smoke from a missile, or a simple explosion effect) as it permits you to quickly and easily create particles at any position in the game room. You can also colour the particles "on the fly" as they are created with this function, and this colour will over-ride the predefined colour of the particle, but it does not blend this colour over the particles lifetime. Note that you must have created the particle system and the particle type previously for this function to be used.


if speed > 1
   part_particles_create_colour(sname, x, y, p_MagicSmoke, choose(c_aqua, c_lime, c_fuschia, c_orange), 1);

The above code will generate a single particle every step that the instance with the code has a speed greater than one. These particles will be of a random colour.

上一页: Particle Systems
下一页: part_system_exists
© Copyright YoYo Games Ltd. 2018 All Rights Reserved