Raised This Month: $51 Target: $400
 12% 

[Info] About bullet/particle power change


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
VEN
Veteran Member
Join Date: Jan 2005
Old 01-11-2007 , 14:49   [Info] About bullet/particle power change
Reply With Quote #1

Note #1: This information probably will not make much sence if you unfamiliar with the trace scripting.

I found the way to change a bullet/particle power directly through fraction traceresult. The problem is that the [power | fraction] dependence are nonlinear.

This is a table for AWP TA leg damage:
Code:
 F          D  
---------------
 0.0        30 
 0.1        29 
 0.3        28 
 0.5        27 
 0.7        26 
 0.9        25 
 1.1        24 
 1.4        23 
 1.7        22 
 2.0        21 
 2.3        20 
 2.6        19 
 2.8        18 
 3.2        17 
 3.5        16 
 3.9        15 
 4.2        14 
 4.6        13 
 5.1        12 
 5.6        11 
 6.2        10 
 6.6         9 
 7.3         8 
 8.0         7 
 8.9         6 
 9.8         5 
10.7         4 
12.0         3 
13.8         2 
16.2         1 
20.4         0
Note #2: For fraction in range {0.0 ... ~5.0} the dependence are nearly linear.

Note #3: Also you can use a negative fraction values to increase power.

Last edited by VEN; 01-11-2007 at 15:18.
VEN is offline
Old 01-13-2007, 22:54
XxAvalanchexX
This message has been deleted by XxAvalanchexX.
Cheap_Suit
Veteran Member
Join Date: May 2004
Old 01-28-2007 , 06:19   Re: [Info] About bullet/particle power change
Reply With Quote #2

This is very interesting. Are the fractions in the table the same with other weapons?
__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.
Cheap_Suit is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 01-29-2007 , 07:01   Re: [Info] About bullet/particle power change
Reply With Quote #3

what?
VEN is offline
Cheap_Suit
Veteran Member
Join Date: May 2004
Old 01-29-2007 , 12:31   Re: [Info] About bullet/particle power change
Reply With Quote #4

The TR_flFraction value.

This is what im trying to do. Block the damage but still have the effect of getting shot.
Quote:
new hitplace = get_tr(TR_iHitgroup)
if(hitplace == HIT_CHEST || hitplace == HIT_STOMACH)
{
set_tr(TR_flFraction, 30.0)
}
Because using 1.0 it seems like you didnt even get hit.
__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.
Cheap_Suit is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 01-29-2007 , 15:03   Re: [Info] About bullet/particle power change
Reply With Quote #5

Quick question, what is TR_flFraction (and the other stuff for that matter). I haven't had much experience with trace_line() and would appreciate a quick explanation ;).
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 01-30-2007 , 08:01   Re: [Info] About bullet/particle power change
Reply With Quote #6

It's a trace result data member. Probably represents a tracing time in some units. To reproduce hit effect without any damage you can set it to high value for example to 100.0.

Last edited by VEN; 01-30-2007 at 08:06.
VEN is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 01-30-2007 , 13:30   Re: [Info] About bullet/particle power change
Reply With Quote #7

I was kind of asking for specifics, I know what it general is :p. Thanks anyway.
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 01-30-2007 , 18:48   Re: [Info] About bullet/particle power change
Reply With Quote #8

http://www.thewavelength.net/forums/...ds/000775.html

Quote:
Originally Posted by botman
flFraction is a variable within this TraceResult structure that tells you how far the trace went before it hit something. For example if you are tracing between 2 points that are 100 units apart and TraceLine returns with flFraction = 0.75 then you know that 3/4 of the way from the start point to the end point something was in the way.
So, the reason that all TraceLine codes assume that you didn't hit anything if flFraction is 1.0, is because that means that the trace made it 100% of the way before hitting anything (aka, it never hit anything).
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS

Last edited by XxAvalanchexX; 02-01-2007 at 02:11.
XxAvalanchexX is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 01-30-2007 , 21:52   Re: [Info] About bullet/particle power change
Reply With Quote #9

Thanks.
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 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 17:33.


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