UTIL HudHintText

From Valve Developer Community
Revision as of 21:09, 10 April 2011 by LordNed (talk | contribs) (Created Page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Template:Wrongtitle UTIL_ScreenFade is a UTIL provided to trigger Instructional hud-hints.

Usage

//-----------------------------------------------------------------------------
// Purpose: Display instructional hud-hints to the specified entity (player)
// Input  : *pEntity - Entity to tell to send the hud-hint to
// Input  : pMessage - HudHint message to Send
// Output : 
//-----------------------------------------------------------------------------
void UTIL_HudHintText( CBaseEntity *pEntity, const char *pMessage )

Examples

//-----------------------------------------------------------------------------
// Purpose: Show people how to drive!
//-----------------------------------------------------------------------------
void CPropJeep::InputShowHudHint( inputdata_t &inputdata )
{
	CBaseServerVehicle *pServerVehicle = dynamic_cast<CBaseServerVehicle *>(GetServerVehicle());
	if ( pServerVehicle )
	{
		if( pServerVehicle->GetPassenger( VEHICLE_ROLE_DRIVER ) )
		{
			UTIL_HudHintText( m_hPlayer, "#Valve_Hint_JeepKeys" );
			m_iNumberOfEntries++;
		}
	}
}
// The first few time we get into the jeep, print the jeep help
if ( m_iNumberOfEntries < hud_airboathint_numentries.GetInt() && !m_bExitAnimOn )
{
	UTIL_HudHintText( m_hPlayer, "#Valve_Hint_BoatKeys" );
	m_iNumberOfEntries++;
}