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
Animated Skyboxes
Spelos Away
Banned

Posts: 231
Threads: 19
Joined: Sep 2014
#3
RE: Animated Skyboxes

Also... you can set the skybox texture with code.

void SetSkyBoxTexture(string& asTexture);

You could perhaps set the skybox repeatedly through frames, but that sounds really rough and could really hit the performance of the mod.


If you REALLY REALLY NEED IT, you could try something like this:

- If you have the frames of the skybox like: MyTexture1.dds, MyTexture2.dds...

int count = 1; //Used for the cycle method
int last = 5; //What is the number of the last frame (MyTexture1... MyTexture5)

void OnStart()
{
    AddTimer("", 0.5f, "SkyboxCycleTimer");
}

void SkyboxCycleTimer(string &in asTimer)
{
    if (count > last)
    {
    count = 1;
    }
    SetSkyBoxTexture("MyTexture" + count);
    count = count + 1;
    AddTimer("", 0.5f, "SkyboxCycleTimer"); //0.5f is the refresh rate in this case
}

But this method is SUPER rough... I wouldn't do it... Tongue
12-19-2015, 03:34 PM
Find


Messages In This Thread
Animated Skyboxes - by Nanatsumi - 12-17-2015, 07:53 PM
RE: Animated Skyboxes - by Romulator - 12-18-2015, 12:15 AM
RE: Animated Skyboxes - by Spelos - 12-19-2015, 03:34 PM
RE: Animated Skyboxes - by Amnesiaplayer - 01-24-2016, 05:47 PM
RE: Animated Skyboxes - by Spelos - 01-24-2016, 10:33 PM
RE: Animated Skyboxes - by Amnesiaplayer - 01-25-2016, 05:25 PM
RE: Animated Skyboxes - by GoreGrinder99 - 01-28-2016, 10:07 PM



Users browsing this thread: 1 Guest(s)