Raised This Month: $ Target: $400
 0% 

Get angle of ground user is standing on


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Max!
Member
Join Date: Jun 2009
Old 02-09-2010 , 23:38   Get angle of ground user is standing on
Reply With Quote #1

The plugin im coding makes jumppads that shoots a user in the direction based on the angle of the jumppad, but the code i tried to use from nomexuoisoajusds lie flat plugin wouldnt work.
the basic setup is this:
_______ <-- AAATRIGGER assigned to a trigger_multiple
_______ <-- ground

when user steps on the AAATRIGGER, it registers in touch, and this is where i need the angle of the ground

thanks for the help in advance
Max! is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-10-2010 , 00:29   Re: Get angle of ground user is standing on
Reply With Quote #2

Code:
new Float:vStart[ 3 ]; pev( iPlayer, pev_origin, vStart ); new Float:vStop[ 3 ]; pev( iPlayer, pev_mins, vStop ); vStop[ 0 ] = vStop[ 1 ] = 0.0; xs_vec_add( vStart, vStop, vStop ); vStop[ 2 ] -= 80.0; // 80 units below player's feet engfunc( EngFunc_TraceLine, vStart, vStop, 0, iPlayer, 0 ); new Float:fFraction; get_tr2( 0, TR_flFraction, fFraction ); if( fFraction != 1.0 ) {     new Float:vPlaneNormal[ 3 ];     get_tr2( 0, TR_vecPlaneNormal, vPlaneNormal );         new Float:vVelocity[ 3 ];     xs_vec_mul_scalar( vPlaneNormal, 500.0, vVelocity ); // 500.0 = speed         set_pev( iPlayer, pev_velocity, vVelocity ); }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Max!
Member
Join Date: Jun 2009
Old 02-10-2010 , 00:40   Re: Get angle of ground user is standing on
Reply With Quote #3

wow man you rock it works perfectly

if there was still karma here, youd be up to your neck in it
Max! is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:16.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode