SCRIPT PROBLEM
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>
|