how do I change the background col to red on script23.c tutorial

Posted By: ncc1701d

how do I change the background col to red on script23.c tutorial - 12/10/09 04:04

when loading script23.c that is mentioned in the tutorial. I get the programmers robot walking.
I wanted to change the background color to red.
I placed "screen_color.red = 150;" line in the space below.
When I run the script it still shows up blue. What am I doing wrong? I am not changing anything else is scipt just adding that line.
(I have same problem when loading a level.)

function main()
{
video_mode = 7;
screen_color.red = 150;
level_load ("");
wait(2);
ent_create("robot.mdl", vector(400, 0, -50), rotate_bone);
mouse_map = crosshair_pcx;
mouse_mode = 2;
{
vec_set(mouse_pos, mouse_cursor);
wait (1);
}
Posted By: delinkx

Re: how do I change the background col to red on script23.c tutorial - 12/10/09 08:32

screen_color is for the screen of window screen color. since u level_load an empty level, the level will overide this color.
Posted By: Helghast

Re: how do I change the background col to red on script23.c tutorial - 12/10/09 13:59

make the sky_color instead of screen_color red after loading the level.

regards,
Posted By: MrGuest

Re: how do I change the background col to red on script23.c tutorial - 12/11/09 01:33

use
Code:
vec_set(sky_color, vector(0,0,150));

as you'll also need to change the sky_color.blue to 0,otherwise you'll end up with a purple sky (background)

hope this helps
Posted By: ncc1701d

Re: how do I change the background col to red on script23.c tutorial - 12/12/09 09:29

ah yes..thanks everyone I got it. cool!
© 2024 lite-C Forums