The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SCRIPT PROBLEM
stinset2 Offline
Junior Member

Posts: 14
Threads: 4
Joined: Dec 2011
Reputation: 0
#1
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>
06-30-2012, 04:52 PM
Find


Messages In This Thread
SCRIPT PROBLEM - by stinset2 - 06-30-2012, 04:52 PM
RE: SCRIPT PROBLEM - by EXAWOLT - 06-30-2012, 04:56 PM
RE: SCRIPT PROBLEM - by stinset2 - 06-30-2012, 05:10 PM
RE: SCRIPT PROBLEM - by Shambles - 06-30-2012, 05:58 PM
RE: SCRIPT PROBLEM - by Cruzore - 06-30-2012, 06:00 PM
RE: SCRIPT PROBLEM - by Your Computer - 06-30-2012, 06:01 PM



Users browsing this thread: 1 Guest(s)