How to set the blend type for pictures in a script for XP?

Hey guys, I downloaded a light script that creates a picture as a light, but the script doesn't set the blend type for the light picture, so its just on normal blending. I want it to be on add blend, so I was trying to figure out how to change the picture's blend type to add.

Here's what I tried:

Content Hidden Spoiler
def initialize(event, radius, tone, flicker, glow, brightness, filename)
super()
self.z = 1000
self.tone = tone
self.opacity = brightness
self.x = (event.real_x - radius * 2 - $game_map.display_x) / 4 + 12
self.y = (event.real_y - radius * 2 - $game_map.display_y) / 4 + 6
bmp = filename == nil ? RPG::Cache.picture(DEFAULT) : RPG::Cache.picture(filename)
self.bitmap = Bitmap.new(radius, radius)
self.bitmap.stretch_blt(Rect.new(0, 0, radius, radius), bmp, bmp.rect)
picture.blend_type = 1
@radius = radius
@brightness = brightness
@event = event
@flicker = flicker
@glow = glow
@step = 0.001
@flicker_count = -1
@count = 0
end


But it didn't work, I got an undefined method error. Any help would be greatly appreciated, thanks!
What class does that initialize method come from?
The class at the top of that part of the script says class Light_Source < Sprite
but what is 'picture'?
the script never sets a value to it. don't you get a nil error?
I would try :
@blend_type = 1
or: self.blend_type = 1
sorry I can't help more, I've never worked with the Sprite class before.

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=76307