06-18-2016, 02:52 PM
06-18-2016, 03:26 PM
You need to set individual values in your lang file for each possible String, and use a String Variable to keep track of it. You can modify the variable using SetLocalVarString();, and use GetLocalVarString(); to call the value to pass into SetMessage();.
Keep in mind, you cannot, in the lang file, do something like this. If you did, it would display that message exactly.
Here's a basic example of what you can do using Set's and Gets, along with Timers to display the message.
-------------------------
extra_english.lang
level.hps
Keep in mind, you cannot, in the lang file, do something like this. If you did, it would display that message exactly.
Code:
<Entry Name="check_bottle">I still need to find the GetLocalVarString("bottle"); before I can progress.</Entry>
Here's a basic example of what you can do using Set's and Gets, along with Timers to display the message.
-------------------------
extra_english.lang
Code:
<CATEGORY Name="Messages">
<Entry Name="value">This is your message.</Entry>
<Entry Name="value_2">This is another message.</Entry>
</CATEGORY>
level.hps
PHP Code:
void OnStart()
{
SetLocalVarString("StringVar", "value");
AddTimer("", 5.0f, "DisplayMsg1");
AddTimer("", 10.0f, "DisplayMsg2");
}
void DisplayMsg1(string &in asTimer)
{
SetMessage("Messages", GetLocalVarString("StringVar"), 2.0f);
SetLocalVarString("StringVar", "value_2");
}
void DisplayMsg2(string &in asTimer)
{
SetMessage("Messages", GetLocalVarString("StringVar"), 2.0f);
}
kalama
06-18-2016, 03:36 PM
Ok. thank you very much
06-18-2016, 04:02 PM
No problem! I also recommend making an account and posting in the Amnesia Development Support subforum in future, since Technical Support is for problems with the unmodified game.
Moving.
Moving.