UTIL HudHintText

From Valve Developer Community
Revision as of 21:10, 10 April 2011 by LordNed (talk | contribs) (Examples: Jeeps are not Airboats valve, don't copy/paste the comment and not fix it!)
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 airboat, print the airboat help
if ( m_iNumberOfEntries < hud_airboathint_numentries.GetInt() && !m_bExitAnimOn )
{
	UTIL_HudHintText( m_hPlayer, "#Valve_Hint_BoatKeys" );
	m_iNumberOfEntries++;
}