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
.Lang File Help I can't randomize my loading screen entries..
z3akx Offline
Junior Member

Posts: 15
Threads: 4
Joined: Dec 2011
Reputation: 0
#1
I can't randomize my loading screen entries..

Hi. well here is my problem, i've made a loading screen and i added a picture and some text

but I cant get it to ramdomize between several texts so it will allways show only 1 text

here is the scripting..


The .hps file
void OnStart()
{
SetEntityPlayerInteractCallback("WindowForest", "Level_WindowForest", false);
SetEntityPlayerLookAtCallback("WindowForest", "ForestText", false);
}

void Level_WindowForest(string &in asEntity)

{
ChangeMap("Forest", "PlayerStartArea_3", "", "");
SetupLoadScreen("LoadingText", "Forest_", 2, "Dark_Forest2.jpg");
}

The .lang file


The Forest is dark and cold
Underneath the shadows in the withered forest secrets are buried


In the loading screen the only text that appears is the Forest_01

Please help Big Grin
04-29-2012, 02:54 PM
Find
FragdaddyXXL Offline
Member

Posts: 136
Threads: 20
Joined: Apr 2012
Reputation: 7
#2
RE: I can't randomize my loading screen entries..

Instead of using the function's random, maybe you could just create a random int variable named something like "i".

Generate a random number and store the value in "i".

then it should look like

void Level_WindowForest(string &in asEntity)

{
int i = RandInt(1, 2);
ChangeMap("Forest", "PlayerStartArea_3", "", "");
SetupLoadScreen("LoadingText", "Forest_0"+i, 0, "Dark_Forest2.jpg");

}

Wait, how exactly is your .lang file set up. XML format and all?

Dark Seclusion Here
(This post was last modified: 04-29-2012, 03:11 PM by FragdaddyXXL.)
04-29-2012, 03:10 PM
Find
z3akx Offline
Junior Member

Posts: 15
Threads: 4
Joined: Dec 2011
Reputation: 0
#3
RE: I can't randomize my loading screen entries..

(04-29-2012, 03:10 PM)FragdaddyXXL Wrote: Instead of using the function's random, maybe you could just create a random int variable named something like "i".

Generate a random number and store the value in "i".

then it should look like

void Level_WindowForest(string &in asEntity)

{
int i = RandInt(1, 2);
ChangeMap("Forest", "PlayerStartArea_3", "", "");
SetupLoadScreen("LoadingText", "Forest_0"+i, 0, "Dark_Forest2.jpg");

}

Wait, how exactly is your .lang file set up. XML format and all?
Oh it worked many thanks man Big Grin

and yea my .lang is XML Smile
04-29-2012, 03:21 PM
Find




Users browsing this thread: 1 Guest(s)