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
is there any reason why 'SetMessage' isn't working?
7thProductions Offline
Junior Member

Posts: 42
Threads: 17
Joined: Mar 2012
Reputation: 0
#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


Messages In This Thread
is there any reason why 'SetMessage' isn't working? - by 7thProductions - 03-24-2012, 05:06 PM



Users browsing this thread: 1 Guest(s)