Frictional Games Forum (read-only)
Loading screens - 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: Loading screens (/thread-10002.html)

Pages: 1 2 3


Loading screens - zeravia - 08-27-2011

I need help with my Loading screens. I have the code but i don't know where to put it or even how to get it running... i did all my own art, is that the problem it's in the right folder... i am so confused, please help me... ><


RE: Loading screens - Juby - 08-27-2011

I'll do a breakdown for you to make it simple:

SetupLoadScreen(string&asTextCat, string&asTextEntry, int alRandomNum, string&asImageFile);

asTextCat - This is the category in the .lang file where to find the entry for the loadscreen text shown during a loadscreen.
asTextEntry - This is the entry that will contain the text message displayed during the loadscreen
int alRandomNum - This sets the amount of different text messages that can be displayed. Say if you set this as 3, for instance, you would need to add 3 different entries in your category for the loadscreen.
asImageFile - This is the picture to display, put the file name of the image here. no extension. Must be a .jpg, I haven't experimented otherwise.

Okay Example of the command. This can be put wherever your feel like it. The loadscreen will not change until you use this command again.
Code:
SetupLoadScreen("LoadingText", "Text_", 3, "TDG_Storage");

example of extra_english.lang
Code:
    <CATEGORY Name="LoadingText">
        <Entry Name="Text_01">Text</Entry>
        <Entry Name="Text_02">More Text</Entry>
        <Entry Name="Text_03">Even More Text</Entry>
        <CATEGORY>

It will chose one of the 3 entries to display during the loadscreen. Your loadscreen image must be in a folder called "images" in your custom_story.

P.S if i made a mistake in the code, I'm sorry, it's late over here and a hurricane is incoming.


RE: Loading screens - zeravia - 08-27-2011

(08-27-2011, 04:55 AM)Juby Wrote: I'll do a breakdown for you to make it simple:

SetupLoadScreen(string&asTextCat, string&asTextEntry, int alRandomNum, string&asImageFile);

asTextCat - This is the category in the .lang file where to find the entry for the loadscreen text shown during a loadscreen.
asTextEntry - This is the entry that will contain the text message displayed during the loadscreen
int alRandomNum - This sets the amount of different text messages that can be displayed. Say if you set this as 3, for instance, you would need to add 3 different entries in your category for the loadscreen.
asImageFile - This is the picture to display, put the file name of the image here. no extension. Must be a .jpg, I haven't experimented otherwise.

Okay Example of the command. This can be put wherever your feel like it. The loadscreen will not change until you use this command again.
Code:
SetupLoadScreen("LoadingText", "Text_", 3, "TDG_Storage");

example of extra_english.lang
Code:
    <CATEGORY Name="LoadingText">
        <Entry Name="Text_01">Text</Entry>
        <Entry Name="Text_02">More Text</Entry>
        <Entry Name="Text_03">Even More Text</Entry>
        <CATEGORY>

It will chose one of the 3 entries to display during the loadscreen. Your loadscreen image must be in a folder called "images" in your custom_story.

P.S if i made a mistake in the code, I'm sorry, it's late over here and a hurricane is incoming.

oh...wait...i think i just got it...


RE: Loading screens - MegaScience - 08-27-2011

(08-27-2011, 04:55 AM)Juby Wrote: P.S if i made a mistake in the code, I'm sorry, it's late over here and a hurricane is incoming.

We'll survive. Smile I can take over for you until it's over, even, if everything goes well. :o


RE: Loading screens - zeravia - 08-27-2011

ok...wait...i got it working once, but when i tried to load my Jpg to it now it's just black and there's no picture.... i have no idea why... DXXX


RE: Loading screens - Elven - 08-27-2011

What format you have. Are you sure it is in right folder?


RE: Loading screens - zeravia - 08-27-2011

(08-27-2011, 10:52 AM)Elven Wrote: What format you have. Are you sure it is in right folder?

yep. i got the picture to work, now i just need to figure out how to get the text it's self to work... O_o;



RE: Loading screens - Elven - 08-27-2011

in loading stuff is 2 things. First says category what you use and second the name of text. The best example is what Juby said:

Code:
<CATEGORY Name="LoadingText">
        <Entry Name="Text_01">Text</Entry>
        <Entry Name="Text_02">More Text</Entry>
        <Entry Name="Text_03">Even More Text</Entry>
        <CATEGORY>

This said for example if you want to show More Text into your loading screen it would be:

Code:
SetupLoadScreen("LoadingText", "Text_02", 1, "TDG_Storage.jpg"); //now it shows everyone that More Text whatever you do!

If you want to show one of the random texts, then use:

Code:
SetupLoadScreen("LoadingText", "Text_", 3, "TDG_Storage.jpg" //Leaving number after Text_ empty shows that number is generated randomly. And that 3 (instead of 1 in previous) shows that first 3 numbers in extra_english.lang, one of them will be used randomly!

I hope it helped, if it didn't feel free to ask more info!


RE: Loading screens - zeravia - 08-27-2011

(08-27-2011, 06:02 PM)Elven Wrote: in loading stuff is 2 things. First says category what you use and second the name of text. The best example is what Juby said:

Code:
<CATEGORY Name="LoadingText">
        <Entry Name="Text_01">Text</Entry>
        <Entry Name="Text_02">More Text</Entry>
        <Entry Name="Text_03">Even More Text</Entry>
        <CATEGORY>

This said for example if you want to show More Text into your loading screen it would be:

Code:
SetupLoadScreen("LoadingText", "Text_02", 1, "TDG_Storage.jpg"); //now it shows everyone that More Text whatever you do!

If you want to show one of the random texts, then use:

Code:
SetupLoadScreen("LoadingText", "Text_", 3, "TDG_Storage.jpg" //Leaving number after Text_ empty shows that number is generated randomly. And that 3 (instead of 1 in previous) shows that first 3 numbers in extra_english.lang, one of them will be used randomly!

I hope it helped, if it didn't feel free to ask more info!

@x@

now my game crashes when i try to load the level the loading screen is on... where do i put the SetupLoadScreen script? in the level HPS?


RE: Loading screens - Juby - 08-27-2011

(08-27-2011, 07:51 PM)zeravia Wrote: @x@

now my game crashes when i try to load the level the loading screen is on... where do i put the SetupLoadScreen script? in the level HPS?

You can put it in the OnStart, OnEnter, OnLeave, and any other function in a .hps file.