Knockback Wrong Calculation
Hey, i try to make the zombie bomb from cso based on player's velocity and user's fistance from the explosion but the knockback power to be 100.0 + player's velocity based on the distance of the player from the bomb, longer distance = less knockback.
But.. didn't work as expected, i know it 100% is wrong but yeah. PHP Code:
I put the speed as first thing multiplied by entorigin - vicorigin * fl_Time everything / 2 |
Re: Knockback Wrong Calculation
this is kind bad calculations show what is fl_Time is equal to... or atleast the calculation function.
i'm certain there's a better way to achieve such thing. Edit : Try this ::arrow: PHP Code:
|
Re: Knockback Wrong Calculation
Quote:
I tried to get a invers-proportional value from 0 to 1.0 that based on the distance of the player on bomb, did work but not as expected since only on 0 would kick you great. fl_Time was equal to get_distance_f(EntOrigin, VicOrigin) / speed. So, what was the problem in my calculation? I think it is perfect rn and works great, i will also try yours because it may be better but the thing is, it's kinda hilarious that i could do that thing without these xs natives. Edit: yours didn't work at all... |
| All times are GMT -4. The time now is 14:08. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.