effect_create_above

Creates a simple particle effect above all instances.

Syntax:

GML Code Example

effect_create_above(kind, x, y, size, colour);


Argument Description
kind The kind of effect (use one of the constants listed here).
x The x positioning of the effect if relevant.
y The y positioning of the effect if relevant.
size The size of the effect.
colour The colour of the effect.


Returns: N/A


Description

With this function you can create a simple effect above all instances of your room (it is actually created at a depth of -100000). If the effect is anything other ef_rain or ef_snow then you can define an x/y position to create the effect, and the size can be a value of 0, 1, or 2, where 0 is small, 1 is medium and 2 is large.

It is worth noting that these effects can have their drawing toggled on and off, as well as have their drawing paused, by using the functions part_system_automatic_draw and part_system_automatic_update with the appropriate value for the particle system index (where 0 is for effects below and 1 is for effects above).


Example:

GML Code Example

if health <= 0
    {
    effect_create_above(ef_explosion, x, y, 1, c_yellow);
    instance_destroy();
    }
 

The above code will create a medium, yellow, explosion above the instance and destroy it should the "health" variable be less than or equal to 0.





No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here