Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, TedMar, dr_panther), 1,049 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
SKY entity is not visible #295877
10/28/09 09:13
10/28/09 09:13
Joined: Mar 2009
Posts: 276
Cebu City, Philippines
boyax Offline OP
Member
boyax  Offline OP
Member

Joined: Mar 2009
Posts: 276
Cebu City, Philippines
Hi,

I have a trouble showing the sky entity at runtime...it is not visible..
First, I set the sky_color since I need to display a background panel menu in the negative layer.
So, I initialize this:
Code:
sky_color.red   = 0;
sky_color.green = 0;
sky_color.blue  = 0;
..
level_load(NULL); //load null level here



then, in the menu part, I create the menu panel background:
Code:
pan1 = pan_create("bmap = image1.dds", -100);



I put this menu background in the negative layer since I need to display a 3D animating model in the menu..
Code:
ent_plMenu = ent_create("FoxBike.mdl", vector(350,60,0), plAction);   
vec_set(ent_plMenu.pan, vector(210,-5,0) );



Then, during loading already of the game, I created the sky entity:
Code:
//create the sky entity
if(ent_sky)
{
   ent_remove(ent_sky);
}
ent_sky = ent_createlayer("skies+6.tga", SKY|CUBE|SHOW, 999);   
if(ent_sky)
{
   printf("sky created!");  --> but this sky entity is created but not shown in the game (black sky)... why???
}
level_load("W1Lvl1.wmb"); //level 1



Anyone encountered this problem???
Thanks

Re: SKY entity is not visible [Re: boyax] #295879
10/28/09 10:02
10/28/09 10:02
Joined: Apr 2006
Posts: 624
DEEP 13
badapple Offline
User
badapple  Offline
User

Joined: Apr 2006
Posts: 624
DEEP 13
i believe your level load after creation wipes it out

Re: SKY entity is not visible [Re: badapple] #295905
10/28/09 14:19
10/28/09 14:19
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!

Sky_color is for sky cubes.

screen_color when there is no level "NULL"


Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C
Re: SKY entity is not visible [Re: Ottawa] #296000
10/29/09 01:41
10/29/09 01:41
Joined: Apr 2006
Posts: 624
DEEP 13
badapple Offline
User
badapple  Offline
User

Joined: Apr 2006
Posts: 624
DEEP 13
accually sky_color is for when there is no sky cube or dome or such , and if there is a sky_cube sky_color should be set to a
negative number like -1 to prevent from being drawn , if you are concerned at all about frame rate.

Re: SKY entity is not visible [Re: badapple] #296165
10/30/09 01:40
10/30/09 01:40
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
hey, use
Code:
vec_normalize(ent_sky.scale_x, 1);

whis this is needed i don't know but i need to put it everytime


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1