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



Loading Screen - Catalyst - 08-30-2014

Greetings,

there's a little problem; loading screen is not showing the message from lang file.

lang file:
(...)
<CATEGORY Name="Loading">
<Entry Name="level_1">All were lost, when Ruby died...Johan thought that he cannot continue...</Entry>
</CATEGORY>
</LANGUAGE>

hps file:

void OnLeave()
{
AddEntityCollideCallback("Player", "Survivor", "Escape", true, 1);
AddEntityCollideCallback("Player", "SlimeCollide2", "BigShit2", true, 1);
AddEntityCollideCallback("Player", "QuestArea6", "MyRoom", true, 1);
AddEntityCollideCallback("Player", "QuestArea7", "MyRoom2", true, 1);
AddEntityCollideCallback("Player", "QuestArea8", "MyRoom3", true, 1);
AddEntityCollideCallback("Player", "SlimeFear", "Slimee", true, 1);
SetupLoadScreen("Loading", "level_1", 1, "game_loading_rose.jpg");
}

please tell me what I'm doing wrong Smile

P.S: Lang file is structured normal, i just copied only the most important for this thread, Thanks.


RE: Loading Screen - Mudbill - 08-30-2014

Do other messages in your lang file work? Is it showing the image but not the text?


RE: Loading Screen - Catalyst - 08-31-2014

"Do other messages in your lang file work? Is it showing the image but not the text?"

It,s the only message. Image is showed... maybe I must create it again


RE: Loading Screen - Romulator - 08-31-2014

Does every other message in your game work? If not, could you please post the whole of your lang file so we can check that? One mistake in the whole lang file breaks all messages.


RE: Loading Screen - Catalyst - 08-31-2014

Working, but how I can do to make random messages on doors? It's possible?


RE: Loading Screen - DnALANGE - 08-31-2014

yes it is possible..
Add a randint to it.
Then make the script choose the sound\message itself.
Here is anexample:

PHP Code:
        /////ActivateOtherRandomSoundsOutside////
        
void StarttheScreams(string &in asParentstring &in asChildint alState)
{
if(
alState == 1)
{
SetLocalVarInt("TimerSCreams"1);
AddTimer("StopScreamsOutside_"+RandInt(1,7), RandInt(3,15), "TimerLooScreams");
PlaySoundAtEntity("""afx_spooky_eerie_monster_type2.snt""Player"0true);
}

if(
alState == -1)
{
SetLocalVarInt("TimerSCreams"0);
}
}

void TimerLooScreams(string &in asTimer)
{
if(
GetLocalVarInt("TimerSCreams") == 1)
{
if(
asTimer == "StopScreamsOutside_1")
{
PlaySoundAtEntity("""afx_spooky_eerie_monster_type2.snt""Player"0true);
AddTimer("StopScreamsOutside_"+RandInt(1,2), RandInt(4,25), "TimerLooScreams");
}
if(
asTimer == "StopScreamsOutside_2")
{
PlaySoundAtEntity("""afx_spooky_eerie_monster_type2_louder.snt""Player"0true);
AddTimer("StopScreamsOutside_"+RandInt(1,2), RandInt(3,24), "TimerLooScreams");
}
}

The above is for other things but it is how it can look, but learn the script and try yourseld by testing rand variables.


RE: Loading Screen - Catalyst - 08-31-2014

Thanks for suggestion, there also I can put if and else.


RE: Loading Screen - PutraenusAlivius - 08-31-2014

(08-31-2014, 01:44 PM)DnALANGE Wrote: yes it is possible..
Add a randint to it.
Then make the script choose the sound\message itself.
Here is anexample:

PHP Code:
        /////ActivateOtherRandomSoundsOutside////
        
void StarttheScreams(string &in asParentstring &in asChildint alState)
{
if(
alState == 1)
{
SetLocalVarInt("TimerSCreams"1);
AddTimer("StopScreamsOutside_"+RandInt(1,7), RandInt(3,15), "TimerLooScreams");
PlaySoundAtEntity("""afx_spooky_eerie_monster_type2.snt""Player"0true);
}

if(
alState == -1)
{
SetLocalVarInt("TimerSCreams"0);
}
}

void TimerLooScreams(string &in asTimer)
{
if(
GetLocalVarInt("TimerSCreams") == 1)
{
if(
asTimer == "StopScreamsOutside_1")
{
PlaySoundAtEntity("""afx_spooky_eerie_monster_type2.snt""Player"0true);
AddTimer("StopScreamsOutside_"+RandInt(1,2), RandInt(4,25), "TimerLooScreams");
}
if(
asTimer == "StopScreamsOutside_2")
{
PlaySoundAtEntity("""afx_spooky_eerie_monster_type2_louder.snt""Player"0true);
AddTimer("StopScreamsOutside_"+RandInt(1,2), RandInt(3,24), "TimerLooScreams");
}
}

The above is for other things but it is how it can look, but learn the script and try yourseld by testing rand variables.

Another alternative is to use RandInt and Switch statements. I used it and it's working fine and well. Heck, I even made a thread on how to make your stuff to randomize. Originally it's for scares but you can repurpose it as you wish.


RE: Loading Screen - burge4150 - 09-02-2014

Switches are the best thing to pair with a random int.

It's like they were made to go together.

Like peanut butter and jelly.

Seriously, switches.