Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Loading Screen
Catalyst Offline
Member

Posts: 213
Threads: 32
Joined: Aug 2014
Reputation: 3
#1
Loading Screen

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.

Egypt CS
[Image: 27003.png]
(This post was last modified: 08-30-2014, 07:36 PM by Catalyst.)
08-30-2014, 07:31 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#2
RE: Loading Screen

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

08-30-2014, 09:10 PM
Find
Catalyst Offline
Member

Posts: 213
Threads: 32
Joined: Aug 2014
Reputation: 3
#3
RE: Loading Screen

"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

Egypt CS
[Image: 27003.png]
08-31-2014, 01:05 PM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#4
RE: Loading Screen

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.

Discord: Romulator#0001
[Image: 3f6f01a904.png]
08-31-2014, 01:19 PM
Find
Catalyst Offline
Member

Posts: 213
Threads: 32
Joined: Aug 2014
Reputation: 3
#5
RE: Loading Screen

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

Egypt CS
[Image: 27003.png]
08-31-2014, 01:28 PM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#6
RE: Loading Screen

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

PHP Code: (Select All)
        /////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.
(This post was last modified: 08-31-2014, 01:47 PM by DnALANGE.)
08-31-2014, 01:44 PM
Find
Catalyst Offline
Member

Posts: 213
Threads: 32
Joined: Aug 2014
Reputation: 3
#7
RE: Loading Screen

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

Egypt CS
[Image: 27003.png]
(This post was last modified: 08-31-2014, 02:20 PM by Catalyst.)
08-31-2014, 02:16 PM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#8
RE: Loading Screen

(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: (Select All)
        /////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.

"Veni, vidi, vici."
"I came, I saw, I conquered."
08-31-2014, 02:43 PM
Find
burge4150 Offline
Member

Posts: 56
Threads: 15
Joined: Feb 2014
Reputation: 0
#9
RE: Loading Screen

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.
09-02-2014, 03:03 PM
Find




Users browsing this thread: 1 Guest(s)