effect_create_above(kind,x,y,size,color)

Drag & Drop equivalent : action_explosion

 

kind = The kind of in built effect you want:

ef_explosion, ef_ring, ef_ellipse, ef_firework, ef_smoke, ef_smokeup, ef_star, ef_spark, ef_flare, ef_cloud, ef_rain, ef_snow

x = Horizontal position of effect

y = Vertical position of effect

size = The size of the effect:

0 - small

1 - medium

2 - large

color = The colour of the effect.

 

Example:

effect_create_above(ef_flare,x,y,0,c_white)

 

The above example will create a small white flare effect at the instances x & y position in front of the instance that this code is placed in.

 

effect_create_above will create one of the easy-to-use in built particle effects at a depth of -100000 which means it will be created in front of all instances unless the instance has a smaller depth. x and y can be specific coordinates (124, 322), relative to self coordinates (the example above, placed in an objects collision event with another object will create the effect at the instances x & y position) or relative to other coordinates:

 

effect_create_above(ef_flare,obj_monster.x,obj_monster.y,0,c_white);

 

color can be one of the in built colours (see draw_set_color for list of in built colours) or you can specify the exact colour by using the make_color_rgb or make_color_hsv function.

Revision #1