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
Level Editor Help Skybox not staying?
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#1
Skybox not staying?

Hi, I've got a skybox already configured for my map, I make it active and import into the map. But when I re open the map in the editor, it disappears and I have to locate it again. I have just saved the skybox picture in my custom stories folder (custom_stories/redemption/textures)...Does it do the same thing with entities? As in it wont show up in the editor if you have not got it in the root folder aswell?

10-21-2011, 12:58 PM
Find
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#2
RE: Skybox not staying?

One way to avoid this is to just set the skybox through the script. That way you can use whatever background colour makes it easiest to edit with in the editor.
void OnStart()
{
//May also want to use: SetSkyBoxColor(float afR, float afG, float afB, float afA)
SetSkyBoxTexture("My_Texture_File_Name_With_Extension");
SetSkyBoxActive(true);
}

The reason why it "forgets" the skybox texture is because the custom stories directory isn't in the list of directories the editor loads in iirc. The editor only uses the file name and not the full path and then performs a search to find the texture inside the loaded directories.
The main game doesn't do this due to the way resources are loaded for CS's- which is why it shows up in the main game but not the editor.
(This post was last modified: 10-21-2011, 01:07 PM by Apjjm.)
10-21-2011, 01:04 PM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#3
RE: Skybox not staying?

(10-21-2011, 01:04 PM)Apjjm Wrote: One way to avoid this is to just set the skybox through the script. That way you can use whatever background colour makes it easiest to edit with in the editor.
void OnStart()
{
//May also want to use: SetSkyBoxColor(float afR, float afG, float afB, float afA)
SetSkyBoxTexture("My_Texture_File_Name_With_Extension");
SetSkyBoxActive(true);
}

The reason why it "forgets" the skybox texture is because the custom stories directory isn't in the list of directories the editor loads in iirc. The editor only uses the file name and not the full path and then performs a search to find the texture inside the loaded directories.
The main game doesn't do this due to the way resources are loaded for CS's- which is why it shows up in the main game but not the editor.
So if i don't use the script, will it still be there in the main game if i include it in the custom story directory?

10-21-2011, 01:28 PM
Find
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#4
RE: Skybox not staying?

(10-21-2011, 01:28 PM)flamez3 Wrote: So if i don't use the script, will it still be there in the main game if i include it in the custom story directory?
Perhaps, it depends if the level editor - after not finding the image - overwrites the skybox settings with the empty settings it shows in the options when you next save the level. I still recommend setting the sky-box via the script though - you completely avoid this problem, and can use the default background in the editor which makes it easier to see objects.
(This post was last modified: 10-21-2011, 02:03 PM by Apjjm.)
10-21-2011, 02:02 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#5
RE: Skybox not staying?

As Apjjm mentioned, it doesn't stick because the resources.cfg file doesn't include your custom story's folder.

Tutorials: From Noob to Pro
(This post was last modified: 10-21-2011, 03:29 PM by Your Computer.)
10-21-2011, 03:26 PM
Website Find




Users browsing this thread: 1 Guest(s)