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
EXAWOLT Offline
Member

Posts: 113
Threads: 14
Joined: Apr 2012
Reputation: 3
#2
RE: SCRIPT PROBLEM

can´t find any problems with the messages, but im not familiar to your way of using timers, maybe something struggling with them?

simply nuff said




06-30-2012, 04:56 PM
Find
stinset2 Offline
Junior Member

Posts: 14
Threads: 4
Joined: Dec 2011
Reputation: 0
#3
RE: SCRIPT PROBLEM

(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...
06-30-2012, 05:10 PM
Find
Shambles Offline
Junior Member

Posts: 32
Threads: 4
Joined: Jun 2012
Reputation: 4
#4
RE: SCRIPT PROBLEM

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?
06-30-2012, 05:58 PM
Find
Cruzore Offline
Senior Member

Posts: 301
Threads: 2
Joined: Jun 2012
Reputation: 37
#5
RE: SCRIPT PROBLEM

<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 ".

Think, before you speak Google, before you post
06-30-2012, 06:00 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#6
RE: SCRIPT PROBLEM

The messages don't work because he's using special quotation marks for them. Those aren't considered valid quotation marks.

Edit: Ninja'd.

Tutorials: From Noob to Pro
(This post was last modified: 06-30-2012, 06:01 PM by Your Computer.)
06-30-2012, 06:01 PM
Website Find




Users browsing this thread: 3 Guest(s)