[LANG] I can't randomize my loading screen entries.. - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: [LANG] I can't randomize my loading screen entries.. (/thread-15171.html) |
I can't randomize my loading screen entries.. - z3akx - 04-29-2012 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 RE: I can't randomize my loading screen entries.. - FragdaddyXXL - 04-29-2012 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? RE: I can't randomize my loading screen entries.. - z3akx - 04-29-2012 (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".Oh it worked many thanks man and yea my .lang is XML |