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
death message
good871 Offline
Junior Member

Posts: 22
Threads: 10
Joined: Aug 2011
Reputation: 0
#1
death message

Hi , how to edit message after player die.

Blush
09-05-2011, 06:43 PM
Find
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#2
RE: death message

There are two methods:

1) Checkpoints:
CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry);

2) SetDeathHint
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:
<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):
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");
}
(This post was last modified: 09-05-2011, 07:33 PM by Apjjm.)
09-05-2011, 07:26 PM
Find
good871 Offline
Junior Member

Posts: 22
Threads: 10
Joined: Aug 2011
Reputation: 0
#3
RE: death message

thank you, i'm going try this.
09-05-2011, 08:17 PM
Find




Users browsing this thread: 2 Guest(s)