Random loading screen texts - 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: Random loading screen texts (/thread-20848.html) |
Random loading screen texts - LankySpankey103 - 03-21-2013 Hey guys. I have this custom story, where whenever the player enters a level door, I want the loading messeage to appear randomly between my 5 loading texts I have written in the .lang file. But the thing is, I have no clue how the random function works :-\ I'm thinking something like, everytime the player enters the map, there should be generated a random number, which then is attached to a certain loading screen? But will that work? I have done something like this, but it doesn't seem to work. Code: void OnEnter() Thanks in advance. RE: Random loading screen texts - Your Computer - 03-21-2013 All you should need is Code: void OnLeave() RE: Random loading screen texts - NaxEla - 03-21-2013 You need to use SetupLoadScreen in your OnLeave function. Then in your .lang file, make sure you name the entries something like "LoadingText01", "LoadingText02", "LoadingText03", etc., so that the names are the same except the last number. For example, if you named the entries like above, the category as "LoadingText", and you had 5 loading texts: Script: PHP Code: void OnLeave() lang: Code: <LANGUAGE> RE: Random loading screen texts - LankySpankey103 - 03-22-2013 Wow, it was that simple! Thanks guys! It works perfectly :-) |