Env_Hudhint

Tutorial collection, comprehensive listings on main site.

Env_Hudhint

Postby Tutorial on Wed Mar 16, 2005 12:40 am

category
General Half-Life 2/Entities

description
Remember when you had on-screen prompts in HL2? This tutorial shows you how it's done.

keywords
env_hudhint, hud, hint, env.

Env_Hudhint tutorial

This tutorial will require you to modify some files, so be sure to make a backup before you proceed! This tutorial will also require that you have a GCF-unpacker utility. GCFScape is recommended.

1.) The text file

In order for the hudhint to work, you must edit a text file named valve_english.txt, which you must obtain by opening the half-life 2 content.gcf and look it up in the resource folder. Now, if you didn’t use the Create a Mod option in the SDK (i.e. you are not making a mod) you must create a new folder in the hl2 folder named resource (if it isn’t there already)

Something like this : D:\Valve\Steam\SteamApps\username\half-life 2\hl2\resource

Then, extract the valve_english.txt file from the GCF into this folder. Open up the text file, you’ll see that there is nothing confusing about it (no programming skills needed) It should be something like this :

Code: Select all
"lang"
{
"Language" "English"
"Tokens"
{
"Valve_Listen_MapName"         "Map"
"Valve_Movement_Title"         "MOVEMENT"
"Valve_Move_Forward"         "Move forward"
"Valve_Move_Back"         "Move back"
"Valve_Turn_Left"         "Turn left"
"Valve_Turn_Right"         "Turn right"
"Valve_Move_Left"         "Move left (strafe)"
"Valve_Move_Right"         "Move right (strafe)"
"Valve_Jump"            "Jump"
"Valve_Duck"            "Duck"


Bla bla bla and so on…

Scroll down to the end of the file and create your hint referring to the existed strings. For example :

"Valve_Hud_SQUAD_FOLLOWING" "SQUAD FOLLOWING"
"Valve_Hud_SQUAD_STATIONED" "SQUAD STATIONED"

"NightFall_Hint_USEHeal" "%+use% TO ADMINISTER FIRST AID"
"NightFall_Hint_USEknock" "%+use% TO KNOCK ON LOCKED DOOR"


}
}
Then go to your map, create an env_hudhint in it, give it a name, then in the “Hint Text (localized)” tab, type in your hint name, in my case, I would type in “NightFall_Hint_USEHeal” without the quotes.

Image

Set a trigger to show the message, and voila! It should work fine. Remember, if you didn’t use the Create a Mod function, include the valve_english.txt with your map or else others won’t be able to see it.

CREMATOR666
- Don't send PM's to this user -
Tutorial
Not A Real User
 
Joined: Sun Mar 06, 2005 11:00 pm

Postby Mr. Happy on Fri Mar 09, 2007 2:00 am

This simply does NOT work. At least for me....

I've followed the tutorial to the letter as well as trying my own variations.
Image
-You've just been happified!?
User avatar
Mr. Happy
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Sat Dec 30, 2006 9:20 am
Location: Flyin' thru "da cloud" in the MotherShip

Re: Env_Hudhint

Postby MMmaster on Fri Oct 09, 2009 9:41 am

Could anybody manage to get this env_hudhint to work?
All I get is an empty hint when I trigger it, the text is not displayed just a thin flashing hint line apears.

Why is this?
MMmaster
Member
Member
 
Joined: Fri Apr 17, 2009 2:17 pm

Re: Env_Hudhint

Postby tundra_cool on Fri Oct 09, 2009 9:45 pm

MMmaster wrote:Could anybody manage to get this env_hudhint to work?
All I get is an empty hint when I trigger it, the text is not displayed just a thin flashing hint line apears.

Why is this?


You must have it display a binded key. It can't be a text-only box.
User avatar
tundra_cool
Been Here A While
Been Here A While
 
Joined: Thu Feb 23, 2006 5:48 am

Re: Env_Hudhint

Postby MMmaster on Wed Oct 14, 2009 12:54 pm

Thanks tundra_cool, with a binded key it works.
MMmaster
Member
Member
 
Joined: Fri Apr 17, 2009 2:17 pm

Return to Tutorials

Who is online

Users browsing this forum: No registered users