Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
is there any reason why 'SetMessage' isn't working?
Author Message
7thProductions Offline
Junior Member

Posts: 36
Joined: Mar 2012
Reputation: 0
Post: #1
Question is there any reason why 'SetMessage' isn't working?
I've tried (almost) everything to get 'SetMessage' to work but no matter what I do; everytime I lanuch my map said message does not show up and I don't know what to do...

I recall someone saying that there doesn't have to be something with the HPS file for this to happen, but that there could be something with the LANG file, but I don't see anything wrong with either...

script:

////////////////////////////
// Run first time starting map
void OnStart()
{
SetPlayerCrouching(true);
SetPlayerActive(false);
ShowPlayerCrossHairIcons(false);
SetSanityDrainDisabled(true);
SetPlayerHealth(10.0);
AddPlayerBodyForce(0, 0, -10000, true);
FadeOut(0.0f);
FadeIn(5.0f);
SetPlayerSanity(1);
AddTimer("T1", 3, "Intro");
AddTimer("T2", 6, "Intro");
AddTimer("T3", 8, "Intro");
AddTimer("T4", 10, "Intro");
AddTimer("T5", 12, "Intro");
AddEntityCollideCallback("Player", "violetedwardsspeak1_blood", "Collidevioletedwardsspeak1blood", false, 1);
}
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("ScriptArea_1", 2, 2, "");
}
else if (x == "T3")
{
StopPlayerLookAt();
StartPlayerLookAt("ScriptArea_2", 2, 2, "");
}
else if (x == "T4")
{
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
StopPlayerLookAt();
}
else if (x == "T5")
{
SetPlayerCrouching(false);
SetPlayerActive(true);
ShowPlayerCrossHairIcons(true);
SetPlayerMoveSpeedMul(0.3);
SetPlayerJumpDisabled(true);
SetPlayerCrouchDisabled(true);
SetPlayerRunSpeedMul(0.0);
AddTimer("startplayerlookat", 3, "Collidevioletedwardsspeak1blood");
AddTimer("setmessage", 3, "Collidevioletedwardsspeak1blood");
}
}
void Collidevioletedwardsspeak1blood(string &in asTimer)
{
string x = asTimer;
if (x == "startplayerlookat")
{
SetPlayerActive(false);
ShowPlayerCrossHairIcons(false);
StartPlayerLookAt("blood_spatter01_1", 1, 10, "");
PlaySoundAtEntity("", "react_scare.ent", "Player", 0, false);
}
else if (x == "setmessage")
{
SetMessage("Messages", "blood", 0);
}

}
////////////////////////////
// Run when entering map
void OnEnter()
{

}

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

extra_english.lang:

<LANGUAGE>

<RESOURCES />

<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">YOUR DESCRIPTION HERE</Entry>

</CATEGORY>

<CATEGORY Name="Inventory" />

<CATEGORY Name="Messages" />
<Entry Name="blood">Violet:[br]Is...is that my blood...?[br]What the fuck happened to me!?!</Entry>
</CATEGORY>

<CATEGORY Name="Descriptions" />

<CATEGORY Name="Levels" />
</LANGUAGE>
(This post was last modified: 03-24-2012 05:07 PM by 7thProductions.)
03-24-2012 05:06 PM
Find all posts by this user Quote this message in a reply
TheKataKombs Offline
Member

Posts: 50
Joined: Nov 2010
Reputation: 0
Post: #2
RE: is there any reason why 'SetMessage' isn't working?
SetMessage("Messages", "blood", 0);


u have to take away the 0 and put in seconds how long you want it to stay on the screen..
Like: SetMessage("Messages, "blood", 2.5);
Hope this helps Smile

[Image: at_4653116.png]
03-24-2012 05:12 PM
Find all posts by this user Quote this message in a reply
ClayPigeon Offline
Member

Posts: 151
Joined: Mar 2012
Reputation: 6
Post: #3
RE: is there any reason why 'SetMessage' isn't working?
TeKataKombs - Actually, 0 will force a calculation of the number of the characters and according to it will set a matching amount of time to read the message.

Thread opener:

The problem's within your language file.
Firstly, you did not end your Inventory category, make it like this:

<CATEGORY Name="Inventory">
</CATEGORY>

And then:
<CATEGORY Name="Messages">
</CATEGORY>

Your syntax was: <CATEGORY/>, which is false.
03-24-2012 05:18 PM
Find all posts by this user Quote this message in a reply
7thProductions Offline
Junior Member

Posts: 36
Joined: Mar 2012
Reputation: 0
Post: #4
RE: is there any reason why 'SetMessage' isn't working?
(03-24-2012 05:12 PM)TheKataKombs Wrote:  SetMessage("Messages", "blood", 0);


u have to take away the 0 and put in seconds how long you want it to stay on the screen..
Like: SetMessage("Messages, "blood", 2.5);
Hope this helps Smile
it didn't do anything... :[
03-24-2012 05:19 PM
Find all posts by this user Quote this message in a reply
ClayPigeon Offline
Member

Posts: 151
Joined: Mar 2012
Reputation: 6
Post: #5
RE: is there any reason why 'SetMessage' isn't working?
(03-24-2012 05:19 PM)7thProductions Wrote:  
(03-24-2012 05:12 PM)TheKataKombs Wrote:  SetMessage("Messages", "blood", 0);


u have to take away the 0 and put in seconds how long you want it to stay on the screen..
Like: SetMessage("Messages, "blood", 2.5);
Hope this helps Smile
it didn't do anything... :[
Please, try my solution.
03-24-2012 05:21 PM
Find all posts by this user Quote this message in a reply
Unearthlybrutal Offline
Senior Member

Posts: 692
Joined: May 2011
Reputation: 24
Post: #6
RE: is there any reason why 'SetMessage' isn't working?
The problem is what ClayPigeon said.
Smile You can use this in your .lang file:

Spoiler below!


<LANGUAGE>

<RESOURCES>
</RESOURCES>

<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">YOUR DESCRIPTION HERE</Entry>
</CATEGORY>

<CATEGORY Name="Inventory" />
</CATEGORY>

<CATEGORY Name="Messages" />
<Entry Name="blood">Violet:[br]Is...is that my blood...?[br]What the fuck happened to me!?!</Entry>
</CATEGORY>

<CATEGORY Name="Descriptions" />
</CATEGORY>

<CATEGORY Name="Levels" />
</CATEGORY>

</LANGUAGE>




When Life No Longer Exists
Full-conversion mod
03-24-2012 05:29 PM
Visit this user's website Find all posts by this user Quote this message in a reply
7thProductions Offline
Junior Member

Posts: 36
Joined: Mar 2012
Reputation: 0
Post: #7
RE: is there any reason why 'SetMessage' isn't working?
(03-24-2012 05:18 PM)ClayPigeon Wrote:  TeKataKombs - Actually, 0 will force a calculation of the number of the characters and according to it will set a matching amount of time to read the message.

Thread opener:

The problem's within your language file.
Firstly, you did not end your Inventory category, make it like this:

<CATEGORY Name="Inventory">
</CATEGORY>

And then:
<CATEGORY Name="Messages">
</CATEGORY>

Your syntax was: <CATEGORY/>, which is false.

okay, I did what you told me to do, but the message still won't show up on the screen
03-24-2012 05:30 PM
Find all posts by this user Quote this message in a reply
ClayPigeon Offline
Member

Posts: 151
Joined: Mar 2012
Reputation: 6
Post: #8
RE: is there any reason why 'SetMessage' isn't working?
(03-24-2012 05:30 PM)7thProductions Wrote:  
(03-24-2012 05:18 PM)ClayPigeon Wrote:  TeKataKombs - Actually, 0 will force a calculation of the number of the characters and according to it will set a matching amount of time to read the message.

Thread opener:

The problem's within your language file.
Firstly, you did not end your Inventory category, make it like this:




And then:



Your syntax was: , which is false.

okay, I did what you told me to do, but the message still won't show up on the screen


Try using Unreathlybrutal's syntax, it seems correct.
03-24-2012 05:33 PM
Find all posts by this user Quote this message in a reply
Unearthlybrutal Offline
Senior Member

Posts: 692
Joined: May 2011
Reputation: 24
Post: #9
RE: is there any reason why 'SetMessage' isn't working?
...just copy the code from my previous post...

When Life No Longer Exists
Full-conversion mod
03-24-2012 05:33 PM
Visit this user's website Find all posts by this user Quote this message in a reply
7thProductions Offline
Junior Member

Posts: 36
Joined: Mar 2012
Reputation: 0
Post: #10
RE: is there any reason why 'SetMessage' isn't working?
(03-24-2012 05:33 PM)Unearthlybrutal Wrote:  ...just copy the code from my previous post...

still nothing...
03-24-2012 06:41 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)