thanks to andrew i think i now have an idea on how do i go about doing a timer 
but how about a function that checks the distance moved every frame? i want 
something in which lets say i run a distance on a wall for 100units and then 
after that gravity kicks in. how would that work. and how do i do something 
which will let me pre maturely exit of the same state instead of running the 
full 100units. below is a small chunk of codes in which i use.

Vector EndPoint;
trace_t tr;

if( mv->m_nButtons & IN_SPEED && mv->m_nButtons & IN_FORWARD )
{
for(i = 0; i < 2; i++)

EndPoint[i] = player->GetAbsOrigin()[i] + m_vecRight[i] * 24.0f;

UTIL_TraceLine( player->GetAbsOrigin(), EndPoint, MASK_SOLID_BRUSHONLY, NULL, 
COLLISION_GROUP_NONE, &tr);

if( tr.fraction < 1.0 ) // There is a wall

{
//Wall Running
player->SetMoveType( MOVETYPE_WALL );

if ( mv->m_flForwardMove> 10.0f)
{
AddGravity();
}
}

else

{
// no wall
mv->m_nOldButtons |= IN_JUMP;

return false;
}
}

_________________________________________________________________
Publish your photos to your Space easily with Photo Gallery
http://www.get.live.com/wl/all

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to