Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Colored Screen
diabi85 Offline
Junior Member

Posts: 9
Threads: 2
Joined: Jul 2011
Reputation: 0
#1
Colored Screen

Hi guys!

Do you know if there is a way to make the screen colored while playing?
Something like when you're running out of health, but without having to modify the health and using custom colors.
I know I can modify the color of lights, but I'm looking for something like a colored filter.

Thanks!
07-29-2011, 02:20 PM
Find
Khyrpa Offline
Senior Member

Posts: 638
Threads: 10
Joined: Apr 2011
Reputation: 24
#2
RE: Colored Screen

FadeSepiaColorTo(float afAmount, float afSpeed);

you could try that out and see if its what you want.

07-29-2011, 02:21 PM
Find
diabi85 Offline
Junior Member

Posts: 9
Threads: 2
Joined: Jul 2011
Reputation: 0
#3
RE: Colored Screen

(07-29-2011, 02:21 PM)Khyrpa Wrote: FadeSepiaColorTo(float afAmount, float afSpeed);

you could try that out and see if its what you want.

Thanks for the quick reply!
Unfortunately that's not what I want.
I'm looking for a way to change the RGB values, so I can make the screen whatever color I want.
07-29-2011, 02:45 PM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#4
RE: Colored Screen

You would have to to place a box light that covers everything in the level and keep it at a somewhat low number for light value (like 0.2 for dark, 0.4 for mid, and 0.7 for bright, and 1.0 for max). Then use this to change the value of it:

FadeLightTo(string& asLightName, float afR, float afG, float afB, float afA, float afRadius, float afTime);

Changes the properties of a light.

asLightName - internal name
afR - red value
afG - green value
afB - blue value
afA - alpha value
afRadius - radius of the light. -1 means keeping the radius
afTime - time in seconds until change is done


Then you could use it to change back to the original lighting etc.

(This post was last modified: 07-29-2011, 02:54 PM by Kyle.)
07-29-2011, 02:54 PM
Find
diabi85 Offline
Junior Member

Posts: 9
Threads: 2
Joined: Jul 2011
Reputation: 0
#5
RE: Colored Screen

(07-29-2011, 02:54 PM)Kyle Wrote: You would have to to place a box light that covers everything in the level and keep it at a somewhat low number for light value (like 0.2 for dark, 0.4 for mid, and 0.7 for bright, and 1.0 for max). Then use this to change the value of it:

FadeLightTo(string& asLightName, float afR, float afG, float afB, float afA, float afRadius, float afTime);

Changes the properties of a light.

asLightName - internal name
afR - red value
afG - green value
afB - blue value
afA - alpha value
afRadius - radius of the light. -1 means keeping the radius
afTime - time in seconds until change is done


Then you could use it to change back to the original lighting etc.


Thanks, that worked pretty well!

Anyway, do you know if I can also change the color of the screen when the player is close to death? (let's say I want it blue instead of red)
It seems I can change the noise frequency (in "game.cfg"), but when I change the color values the color keeps being red!
07-30-2011, 02:00 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#6
RE: Colored Screen

(07-30-2011, 02:00 PM)diabi85 Wrote: Anyway, do you know if I can also change the color of the screen when the player is close to death? (let's say I want it blue instead of red)
It seems I can change the noise frequency (in "game.cfg"), but when I change the color values the color keeps being red!
Use a timer to constantly call a function that gets the players health and act accordingly. This is assuming you have a boxlight covering the area. Also, make sure the time interval is greater than 0 and that the function calls itself.

Tutorials: From Noob to Pro
(This post was last modified: 07-30-2011, 08:33 PM by Your Computer.)
07-30-2011, 08:32 PM
Website Find
diabi85 Offline
Junior Member

Posts: 9
Threads: 2
Joined: Jul 2011
Reputation: 0
#7
RE: Colored Screen

(07-30-2011, 08:32 PM)Your Computer Wrote:
(07-30-2011, 02:00 PM)diabi85 Wrote: Anyway, do you know if I can also change the color of the screen when the player is close to death? (let's say I want it blue instead of red)
It seems I can change the noise frequency (in "game.cfg"), but when I change the color values the color keeps being red!
Use a timer to constantly call a function that gets the players health and act accordingly. This is assuming you have a boxlight covering the area. Also, make sure the time interval is greater than 0 and that the function calls itself.

Problem:
whenever the health is lower than 50 the game applies a sort of red filter that covers everything else and becomes stronger as the health is closer to 0.
The result is a mix between the color of the box light and the red filter.
The responsibles I think are some texture I found in the 'hud' folder (inside 'graphics') called 'hud_hurt_noise', and in 'game.cfg' there are some values to tweak (but as I said before changing the color doesn't make anything).
Any idea about how "switch off" this effect? ( or at least how to control it!)
07-31-2011, 12:53 AM
Find




Users browsing this thread: 1 Guest(s)