Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
.Lang File Help I can't randomize my loading screen entries..
Author Message
z3akx Offline
Junior Member

Posts: 15
Joined: Dec 2011
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
FragdaddyXXL Offline
Member

Posts: 133
Joined: Apr 2012
Reputation: 7
Post: #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?

Use gamefront. No pop-ups. :D
Dark Seclusion Here
C++/C# Programmer
(This post was last modified: 04-29-2012 03:11 PM by FragdaddyXXL.)
04-29-2012 03:10 PM
Find all posts by this user Quote this message in a reply
z3akx Offline
Junior Member

Posts: 15
Joined: Dec 2011
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)