09-05-2011, 06:43 PM
09-05-2011, 07:26 PM
There are two methods:
1) Checkpoints:
2) SetDeathHint
According to the script functions wiki page both of these do the trick. The parameters you want in both cases the one referencing a "Category" and an "Entry" - these correspond to your language file. Note that you will need to add an entry to your language file containing the message - the category and entry parameters specify which entry of to show. For more information on language files see here.
There are also some video tutorials here:
http://wiki.frictionalgames.com/hpl2/tut...omakenotes
Whilst these show notes and journal entries the same principle applies - You make your category and entry, but this time you are just referencing the entries through script to set the death hint.
Edit:
Quick example.
Language file:
Using both of the above approaches (you only need to use 1):
1) Checkpoints:
Code:
CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry);2) SetDeathHint
Code:
SetDeathHint(string& asTextCategory, string& asTextEntry);According to the script functions wiki page both of these do the trick. The parameters you want in both cases the one referencing a "Category" and an "Entry" - these correspond to your language file. Note that you will need to add an entry to your language file containing the message - the category and entry parameters specify which entry of to show. For more information on language files see here.
There are also some video tutorials here:
http://wiki.frictionalgames.com/hpl2/tut...omakenotes
Whilst these show notes and journal entries the same principle applies - You make your category and entry, but this time you are just referencing the entries through script to set the death hint.
Edit:
Quick example.
Language file:
Code:
<LANGUAGE>
<CATEGORY Name="DeadMessages">
<Entry Name="DiedInWater">Don't get eaten by splashy!</Entry>
</CATEGORY>
</LANGUAGE>Using both of the above approaches (you only need to use 1):
Code:
void xyzHappens()
{
//Do this BEFORE the player could die when you want to show the hint (use areas or something)
CheckPoint ("RandomCheckpoint","PlayerStartArea_1","","DeadMessages","DiedInWater");
SetDeathHint("DeadMessages","DiedInWater");
}09-05-2011, 08:17 PM
thank you, i'm going try this.