September 04, 2025, 11:06:04 am

The Gang Garrison 2 Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

NOTICE: Wondering where all the forums have gone?

Join the community Discord server!

Pages: [1]

Author Topic: [Client-Side] Transparent Flames and Explosions  (Read 1925 times)

FlareFireburst

  • Junior Member
  • **
  • Karma: 35
  • Offline Offline
  • Posts: 196
  • (ಠ ∩ಠ)
    • YouTube
[Client-Side] Transparent Flames and Explosions
« on: October 15, 2015, 07:45:08 pm »

My first plugin... Just a simple plugin that makes flames and explosions have a transparency (or more accurately, an "Add" blend mode) effect to them.

Screenies:
(click to show/hide)

Some flames appear to not have the effect... I'm guessing that's due to the Draw event being removed and replaced through GML, and the game can't update that fast enough.

The Code:
Code: [Select]
//A simple plugin that makes flames and explosions have an "Addition" blend mode, which makes them look more like light or glowing objects.
    object_event_clear(Flame , ev_draw , 0)
    object_event_add(Flame , ev_draw, 0,
    'draw_set_blend_mode(bm_add);
    draw_sprite_ext(sprite_index, image_index, x, y, image_xscale, image_yscale, 0, c_white, 1);
    draw_set_blend_mode(bm_normal);
    ');
    object_event_add(Explosion , ev_draw, 0,
    'draw_set_blend_mode(bm_add);
    draw_sprite_ext(sprite_index, image_index, x, y, image_xscale, image_yscale, 0, c_white, 1);
    draw_set_blend_mode(bm_normal);
    ')
Logged

Fuzion

  • Lucky Member
  • *******
  • Karma: 22
  • Offline Offline
  • Posts: 888
  • Blind asian.
Re: [Client-Side] Transparent Flames and Explosions
« Reply #1 on: October 15, 2015, 10:00:25 pm »

Added to my plugins.
Logged

aronhun

  • Full Member
  • ***
  • Karma: 10
  • Offline Offline
  • Posts: 348
  • Happily retired
Re: [Client-Side] Transparent Flames and Explosions
« Reply #2 on: October 16, 2015, 07:33:47 am »

Seems nice I'll try this out.
« Last Edit: October 16, 2015, 07:33:56 am by aronhun »
Logged
Pages: [1]
 

Page created in 0.04 seconds with 31 queries.