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
How to make text appear on screen for 5 secs once interactign with an object
LoneWolf Offline
Senior Member

Posts: 308
Threads: 43
Joined: Sep 2010
Reputation: 0
#1
How to make text appear on screen for 5 secs once interactign with an object

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.
(This post was last modified: 11-06-2010, 07:04 PM by LoneWolf.)
11-06-2010, 06:59 PM
Find
anzki Offline
Member

Posts: 88
Threads: 6
Joined: Apr 2010
Reputation: 1
#2
RE: How to make text appear on screen for 5 secs once interactign with an object

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:
SetMessage("Example", "Entry1", 20.0f);

For interaction check tutorials in Frictional Games wiki.

[Image: 2qnr5av.png]
(This post was last modified: 11-06-2010, 07:42 PM by anzki.)
11-06-2010, 07:41 PM
Find
LoneWolf Offline
Senior Member

Posts: 308
Threads: 43
Joined: Sep 2010
Reputation: 0
#3
RE: How to make text appear on screen for 5 secs once interactign with an object

Ok so i have this:


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

</Entry>
</CATEGORY>
11-06-2010, 08:02 PM
Find
anzki Offline
Member

Posts: 88
Threads: 6
Joined: Apr 2010
Reputation: 1
#4
RE: How to make text appear on screen for 5 secs once interactign with an object

Add message function goes to MapName.hps, whenever you want it to be called, and
<CATEGORY Name="Example">
<Entry Name="Entry1">Text comes here.
</Entry>
</CATEGORY>
goes to extra_english.lang

[Image: 2qnr5av.png]
11-07-2010, 11:46 AM
Find
LoneWolf Offline
Senior Member

Posts: 308
Threads: 43
Joined: Sep 2010
Reputation: 0
#5
RE: How to make text appear on screen for 5 secs once interactign with an object

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?
11-07-2010, 06:50 PM
Find
Frontcannon Offline
Senior Member

Posts: 538
Threads: 10
Joined: Jul 2010
Reputation: 2
#6
RE: How to make text appear on screen for 5 secs once interactign with an object

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.


╔═════════════════╗
☺ Smoke weed everyday ☺
╚═════════════════╝
11-07-2010, 07:21 PM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#7
RE: How to make text appear on screen for 5 secs once interactign with an object

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!

11-07-2010, 07:34 PM
Find
LoneWolf Offline
Senior Member

Posts: 308
Threads: 43
Joined: Sep 2010
Reputation: 0
#8
RE: How to make text appear on screen for 5 secs once interactign with an object

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.
(This post was last modified: 11-07-2010, 07:48 PM by LoneWolf.)
11-07-2010, 07:43 PM
Find




Users browsing this thread: 1 Guest(s)