Givin´ the instance another hsv (SOLVED!)

Hi Folks,

a little queston:

I have certain levels in night ambience.
Therefor I changed my player-instance`s hsv in that level, manually.
But naturally, if my player gets assgrabbed by enemies or harmful objects,
the k.o.-animation and the reanimated player idle don´t keep the manually
modified hsv. Now I want to set the values of the hsv within a if room_exists(LV05{
...everytime, when my player goes wreck or revives - in the same hue as he started
at night. I think, there are simple ways to implement, without using shaders.

Any ideas?
Thanks a lot!

Make a global variable (or a variable inside your controller object). Store the default player HSV in that (something like global.player_hsv = make_colour_hsv(?,?,?) ). When you draw your player, instead of using make_color_hsv, you simply assign the colour to the global variable ( draw_sprite_ext(player_sprite,image_index,x,y,image_xscale,image_yscale,image_angle,global.player_hsv,image_alpha) ). Then whenever you want the hsv changed, you change the global variable. This way, the players HSV settings are always saved and will be automatically drawn using that saved variable.

I`ve figured out, how an object can be situatevely tinted into a certain tone:

I simply created a script with if-statements... for example:

// nightfall
if (room = LV05) || (room = LV19) || (room = LV27){ // add further nighttime levels or scenes inside a non-illuminated cave
image_blend = make_color_rgb(89,142,178);}

// sunset
if (room = LV09){
image_blend = make_color_rgb(0,0,0);}

// under water
if place_meeting(x,y,oWater){ // turns into blueish tone, everytime, when the player gets in contact with the water object
image_blend = make_color_rgb(20,120

I named that script "scr_color" and I added scr_color(); into concerning objects (action)

That`s it!

Thank you @woods and @RefresherTowel for your help.
With your hints I came to the path of that kinda solution.

Best wishes,
Last edited: