Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Cogliostro on Fri 13/05/2016 00:24:51

Title: RoomTint troubles
Post by: Cogliostro on Fri 13/05/2016 00:24:51
Okay, I'm having a problem with the RoomTint function.  I had everything shift blue as the main character tries the UV light to check for blood, but when I use the command RoomTint(0,0,0) it does NOT go back to the original color.  As you can see in the BEFORE and AFTER pix below.

BEFORE
(http://castironmuse.com/games/pillars/rt-before.jpg)

AFTER

(http://castironmuse.com/games/pillars/rt-after.jpg)


AGS Editor .NET (Build 3.3.3.0)
32-Bit True Color
Direct3D 9 hardware acceleration
640x400 resolution


GLOBALSCRIPT.ASC
Code (ags) Select

function BluRayOn() {
  int x=0;
  TintScreen(0, 0, x);
  while (x<50) {
    TintScreen(0, 0, x);
    x+=1;
    Wait(1);
  }
 
}

function BluRayOff() {
  int x=50;
  TintScreen(0, 0, x);
  while (x>0) {
    TintScreen(0, 0, x);
    x-=1;
    Wait(1);
  }
}


GLOBALSCRIPT.ASH
Code (ags) Select

import function BluRayOn();
import function BluRayOff();


ROOM CODE
Code (ags) Select
  if (mouse.Mode==eModeFlashligh) {
    BluRayOn();
    player.Say("&284 Running various bandwidths of UV light across the surface to look for either blood or bacteria... and nothing."); 
    BluRayOff();
  }


What the BLAZES did I do wrong?!

- Cogliostro
Title: Re: RoomTint troubles
Post by: Cogliostro on Fri 13/05/2016 01:38:05
ARGH!

The last value I passed was RoomTint (1,0,0) and not (0,0,0)

- Cogliostro
Title: Re: RoomTint troubles
Post by: Mandle on Fri 13/05/2016 12:22:29
Didn't you mean to say:

Quote from: Cogliostro on Fri 13/05/2016 00:24:51
What in the BLUE BLAZES did I do wrong?!