Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit)

Excuse me, I'm trying to apply this to my project, but I would like to make it only affect the background and tiles, if possible, not sprites. How would I change the code to accomplish this?


For the record, I have gotten it to work automatically, and with timers I've made it so it only shifts the hue a certain amount back and forth, it's just I don't know how to make it discriminate between sprites and background/tilesets. That's what I need help with.

Hi! Did you figure it out? I'm wondering the same thing too!

 :)

Nope. :/

(1 edit)

Hey! I did figure *something* out, so for me it affects just the Player - 

In the Player Create Event,  I put:
//shader
pos_uni = shader_get_uniform(sh_hue, "Position"); // control shader

// -1 - min, 1 - max
pos = 0; 

and then (still in the Player object) I have an enemy Collision Event, so when Player takes damage I have:

// Take damage
    pos = 2; //references Hue Shader

^ this alters the colour of the Player, but the whole colour (ie. white bits also change hue). I haven't had a play around to see if I can get it to only change certain parts of the sprite, but maybe this'll help!