Lens Flare Object – Giavapps Lens Flare

 

Giavapps Lens Flare Initialization

 

glf_lens_flare_init(X, Y, SpriteLensFlare, SpriteRay, SpriteGlare, Color) Initializes all local variables for the lens flare.

X: determines the x position of the lens flare.
Y: determines the y position of the lens flare
SpriteLensFlare: determines the lens flare sprite.
SpriteRay: determines the ray sprite.
SpriteGlare: determines the glare sprite.
Color: determines the color of the lens flare.

Once you’ve initialized a GameMaker: Studio Object with this function you gain access to the following local variables:

x determines the x position of the lens flare.

y determines the y position of the lens flare.

glowing determines the glowing level of the lens flare. (Value From 0+) (Default Value: 1)

glowing_speed determines the glowing speed of the lens flare. (Value From 1+) (Default Value: room_speed*2)

rotation determines the rotation of the lens flare. (Value From 0 to 359) (Default Value: 0)

rotation_speed determines the rotation speed of the lens flare. (Value From 1+) (Default Value: room_speed*8)

flickering_enabled determines whether the flickering is enabled (true) or not (false). (Default Value: true)

flickering determines the flickering chances of the lens flare. (Value From 1+) (Default Value: room_speed*8)

flickering_factor determines the flickering factor of the lens flare. (Value From 0+) (Default Value: 0.15)

color determines the color of the lens flare (for example c_white).

color_speed determines the speed when merging the color of the lens flare. (Value From 1+) (Default Value: room_speed)

sprite_lens_flare determines the lens flare sprite. This could be sprite_giavapps_lens_flare_01 or any other lens flare sprite of your choice.

sprite_ray determines the ray sprite. This could be sprite_giavapps_lens_flare_ray_01 or any other ray sprite of your choice.

sprite_glare determines the glare sprite. This could be sprite_giavapps_lens_flare_glare_01 or any other glare sprite of your choice.

 

Giavapps Lens Flare Functions

 

glf_lens_flare_step() Updates the lens flare. This function must be called inside the Step Event of the lens flare.

 

glf_lens_flare_draw() Draws the lens flare. This function must be called inside the Draw Event of the lens flare.

 

Code Examples

 

Creating a Giavapps Lens Flare Object

 

Create Event

 

glf_lens_flare_init(x, y, sprite_giavapps_lens_flare_01, sprite_giavapps_lens_flare_ray_01, sprite_giavapps_lens_flare_glare_01, c_white);//initializes all local variables for the lens flare

 

Step Event

 

glf_lens_flare_step();//updates the lens flare

 

Draw Event

 

glf_lens_flare_draw();//draws the lens flare

 

Controlling Giavapps Lens Flare Effect from another Object

 

Step Event

 

var lens_flare = GiavappsLensFlareObject;//sets a temporary variable to the lens flare object
lens_flare.rotation = point_direction(lens_flare.x, lens_flare.y, mouse_x, mouse_y); //rotates the lens flare object based on the mouse position

 

I am Luigi Piscopo, also known as DJ GiDeejay / Producer / Remixer in the music world. I am a Producer with a lot of experience in photo editing, video editing, audio editing, graphic design, web design, programming and promotion.

Leave a Reply

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

*