Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

How to change blending modes to sprites in an hscript file?

A topic by Richie "Smecko Geck" Scassellati created Aug 09, 2021 Views: 401 Replies: 1
Viewing posts 1 to 2

So I'm trying to add Updike's stage into Modding Plus, and I want the light in the background to have the screen blending mode (the light is a separate sprite from the background). The most I can do so far is change its opacity in the stage's hscript file.

 I tried coding in the hscript file this:

light.blend = SCREEN;

But when I load the stage, the light disappeared :

How can I adjust the light's blending mode? Do I have to modify the source code to get blending modes to work?

Turns out that light.blend = SCREEN; just makes it disappear and makes anything coded after that not show up because it's not coded in properly, so light.blend = "screen"; is the only way to get it working.

The light is a FlxSprite, and FlxSprite does support blend modes, so I still have no idea why Modding+ can't get blend modes to work properly in a stage's hscript.