This function can be used to retrieve the unique layer ID value for the given particle system. You supply the particle system ID value (as returned by the function part_system_create_layer) and the function will return the ID value of the layer. Note that if the particle system has been flagged as persistent, then it may have been placed on a managed layer (if the layer defined when the system was created in a previous room does not exist), meaning that the value returned will be 0.



参数 描述
ind The particle system ID value to get the layer ID of


Real (unique layer ID value or 0 if the layer is an internally managed one)


if part_system_get_layer(global.p_sys) != "effects_layer"
    part_system_layer(global.p_sys, "effects_layer";

The above code will check a particle system to see what layer it is on and if it is not on the given layer it will be changed.