Raised This Month: $32 Target: $400
 8% 

[Solved]Set client's velocity to be like a dash


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 02-14-2015 , 16:16   [Solved]Set client's velocity to be like a dash
Reply With Quote #1

How would I make a client's velocity look like a dash forward(in direction their facing) while at same time if there looking up acutely(not fully up) it would also dash them up at that angle?
__________________

Last edited by WildCard65; 02-15-2015 at 09:07.
WildCard65 is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 02-14-2015 , 22:19   Re: Set client's velocity to be like a dash
Reply With Quote #2

PHP Code:
stock FireTeamRocket(Float:vPos[3], Float:vAng[3], iOwner 0iTeam 0Float:flSpeed 1100.0Float:flDamage 90.0bool:bCrit falseiWeapon = -1)
{
    new 
iRocket CreateEntityByName("tf_projectile_rocket");
    if (
IsValidEntity(iRocket))
    {
        
decl Float:vVel[3]; // Determine velocity based on given speed/angle
        
GetAngleVectors(vAngvVelNULL_VECTORNULL_VECTOR);
        
ScaleVector(vVelflSpeed); 

        
TeleportEntity(iRocketvPosvAngvVel); 
Maybe math similar to what's used here will work. The Pos and Angle I use are ClientEyePosition / ClientEyeAngles
__________________
Chdata is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 02-15-2015 , 09:07   Re: Set client's velocity to be like a dash
Reply With Quote #3

Quote:
Originally Posted by Chdata View Post
PHP Code:
stock FireTeamRocket(Float:vPos[3], Float:vAng[3], iOwner 0iTeam 0Float:flSpeed 1100.0Float:flDamage 90.0bool:bCrit falseiWeapon = -1)
{
    new 
iRocket CreateEntityByName("tf_projectile_rocket");
    if (
IsValidEntity(iRocket))
    {
        
decl Float:vVel[3]; // Determine velocity based on given speed/angle
        
GetAngleVectors(vAngvVelNULL_VECTORNULL_VECTOR);
        
ScaleVector(vVelflSpeed); 

        
TeleportEntity(iRocketvPosvAngvVel); 
Maybe math similar to what's used here will work. The Pos and Angle I use are ClientEyePosition / ClientEyeAngles
That or I remembered that FF2 does something like this for the slowmo rage.
__________________
WildCard65 is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 02-15-2015 , 10:55   Re: [Solved]Set client's velocity to be like a dash
Reply With Quote #4

eh the slowmo rage is bad
__________________
Chdata 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 22:58.


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