Frictional Games Forum (read-only)

Full Version: How to make text appear on screen for 5 secs once interactign with an object
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
eg. a door, i want ext to display on the door only when its locked, i also want text to display when picking up chemicals for mixing. I've asked this before but never got a proper answer.

Thanks.

Edit also i only want these things to display once, its sort of like penumbra's interacting text, but obviously not as much.
Add message:
1.Make category to language file with any name you want to! Let's say category named:"Example". (To easily add this use HPLangtool found in the same folder as the level editor.)
2.Inside the category ("Example", or anything you have put it's name.) create entry with any name you want. Example; "Entry1".
3.Use this script where you want the message to be showed:
Code:
SetMessage(string &asTextCategory, string &asTextEntry, float afTime);
-string &asTextCategory and string &asTextEntry will be the name of a category and entry.
-float afTime will be the time the message is on screen in form; 1.0f(=1 second.)

Example using category "Example" and entry "Entry1", showing the entry for 20 seconds:
Code:
SetMessage("Example", "Entry1", 20.0f);

For interaction check tutorials in Frictional Games wiki.
Ok so i have this:


<CATEGORY Name="Example">
<Entry Name="Entry1">
SetMessage("Example", "Entry1", 20.0f);

</Entry>
</CATEGORY>
Add message function goes to MapName.hps, whenever you want it to be called, and
Code:
<CATEGORY Name="Example">
<Entry Name="Entry1">Text comes here.
</Entry>
</CATEGORY>
goes to extra_english.lang
Yeah ive got it to work now thanks. But, it only activates when i walk into the 'Examine' area. Am i usign the wrong area? Also the worst thing is, a hand(as in to pick somethign up) appears in the area, if you walk into the area the hand stays on the screen till your out of the examine area.

I assume im using the wrong area?
The area is right, the way you're using it is wrong.

It'S nothing you 'walk into'. The examine-area is for examining things, like a clock or a book or any other item you want to make the player know more about.
It mimicks the examine feature from penumbra, where the player had an eye-icon appear when he looked at an object and when he clicked he got a little comment on it, eg. 'This rock looks old'.

So don't place it as something the player walks into like a script area, but rather around an object like a book.
Dude! LoneWolf, what is wrong with you?!?!?!

You probably think that scripting is very hard, but it is fairly easy! All you have to know is the script functions!
Well i dont know what functions to use..... Doesnt matter got it to work. I didnt know the script area worked for this, i thought the examine area was to be used for it as that was what i got told from someone from my last thread. So i got confused.