Frictional Games Forum (read-only)

Full Version: SCRIPT PROBLEM
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey, I can't get the messages to show... please help
here's the script
////////////////////////////
// Run first time starting map
void OnStart()
{
SetEntityPlayerInteractCallback("old", "DoorLockedPlayer", true);
PlaySoundAtEntity("", "break_glass_bottle.snt", "Player", 0, false);
SetPlayerActive(false);
SetPlayerCrouching(true);
FadeOut(0);
FadeIn(3);
AddTimer("T1", 3, "Intro");
AddTimer("T2", 6, "Intro");
AddTimer("T3", 8, "Intro");
AddTimer("T4", 10, "Intro");
AddTimer("T5", 12, "Intro");
}
void DoorLockedPlayer(string &in entity)
{
SetMessage("Messages", "oldlibrary", 4);
}

void Intro(string &in asTimer)
{
string x = asTimer;
if (x == "T1")
{
PlaySoundAtEntity("", "react_sigh.snt", "Player", 0, false);
FadeOut(3);
}
else if (x == "T2")
{
FadeIn(3);
PlaySoundAtEntity("", "react_breath.snt", "Player", 0, false);
StartPlayerLookAt("thing", 2, 2, "");
SetMessage("Messages", "line", 4);
}
else if (x == "T3")
{
StopPlayerLookAt();
StartPlayerLookAt("thing2", 2, 2, "");
}
else if (x == "T4")
{
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
StopPlayerLookAt();
SetMessage("Messages", "line1", 4);
}
else if (x == "T5")
{
SetPlayerCrouching(false);
SetPlayerActive(true);
}
}
////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}
and here's the lang file
<LANGUAGE>
<RESOURCES>
</RESOURCES>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">You play as a man whom's obbession with books has forced him to live alone in his massive mansion. One night when he heard a noise, he went to investigate. He gets beaten down by a creature and transported into an unknown place. </Entry>
<CATEGORY Name=“Messages”>
<Entry Name =“oldlibrary”>That's the old library. I don't want to go in there.</Entry>
<Entry Name =“line”>What was that?</Entry>
<Entry Name =“line1”>I better check it out.</Entry>
</CATEGORY>
</LANGUAGE>
can´t find any problems with the messages, but im not familiar to your way of using timers, maybe something struggling with them?
(06-30-2012, 04:56 PM)EXAWOLT Wrote: [ -> ]can´t find any problems with the messages, but im not familiar to your way of using timers, maybe something struggling with them?

no, the timers worked fine...
The way you name your entries in lang files look odd to me....But I'm really new too so I cann not say much! Does the rest of lang file work?
<Entry Name =“line1”>I better check it out.</Entry> and every other thing in the lang file:
” and “ can not be recognized, you have to use ".
The messages don't work because he's using special quotation marks for them. Those aren't considered valid quotation marks.

Edit: Ninja'd.