problem with sky

Posted By: CodeMaster

problem with sky - 06/28/12 12:48

how i can change sky textures in c-script after level change?
I read that i must use ent_morph for this but i do not know how define type.

Code:
SKY sky_1 = {
	type = "sky_day1.tga";
	layer = 3;
	scale_x = 0.30;
	tilt = -20;
	flags = CYLINDER | OVERLAY | SHOW;
}

SKY sky_2 = {
	type = "sky_day2.tga";
	layer = 4;
	alpha = 40;
	scale_x = 2.2;
	speed_u = 15;
	tilt = -200;
	flags = DOME | OVERLAY | SHOW;
}


Posted By: CodeMaster

Re: problem with sky - 06/28/12 13:36

nevermind, i just figure out that SKY is entity blush
Posted By: xbox

Re: problem with sky - 06/28/12 16:06

what did you end up doing? I had this problem a few weeks ago but I just gave up on it until I find a solution.
Posted By: CodeMaster

Re: problem with sky - 06/28/12 16:14

i was thinking that sky is not member of entity but simply use ent_morph where sky_1 is entity:
Code:
function change_sky(){
	ent_morph(sky_1,"sky1.tga");
}

on_s = change_sky();


© 2024 lite-C Forums