Quote:
Originally Posted by Kuma77
I am working on Capture The Flag for HL 1 , i want to add arrow spr when player has flag the arrow sprite shows you the way for your base ( arrow spr hooked automaticly to player base )
then when player capture or lose flag the arrow spr hidden
i hope you understand me ! .
|
I partly understand you
do you want an arrow like this

that shows the general direction
or one like this
The second one is very easy if you have the player's origin and the base origin
PHP Code:
message_begin( MSG_BROADCAST, SVC_TEMPENTITY );
write_byte( TE_BEAMPOINTS );
engfunc( EngFunc_WriteCoord, v_Origin[ 0 ] ); //origins for start of beam(your case player)
engfunc( EngFunc_WriteCoord, v_Origin[ 1 ] );//origins for start of beam(your case player)
engfunc( EngFunc_WriteCoord, v_Origin[ 2 ] );//origins for start of beam(your case player)
engfunc( EngFunc_WriteCoord, v_Origin[ 0 ] + 300.0);//origins for end of beam(your case base)
engfunc( EngFunc_WriteCoord, v_Origin[ 1 ] );//origins for end of beam(your case base)
engfunc( EngFunc_WriteCoord, v_Origin[ 2 ] + 3000.0 );//origins for end of beam(your case base)
write_short( beam ); //beam model
write_byte( 0 );
write_byte( 0 );
write_byte( 200 ); //life
write_byte( 100 ); //width
write_byte( 50 ); //spread
write_byte( 216 ); //red
write_byte( 0 ); //green
write_byte( 0 ); //blue
write_byte( 255 );
write_byte( 255 );
message_end( );
beam = precache_model( "sprites/laserbeam.spr" );
__________________