Raised This Month: $ Target: $400
 0% 

damage multiplier


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
egbertjan
Senior Member
Join Date: Mar 2007
Location: The Netherlands
Old 10-01-2011 , 08:35   damage multiplier
Reply With Quote #1

Hello,

My current problem is the following:
I got a damage multiplier on every gun depending on the amount of points you have on a certain skill (Power).

PHP Code:
public fw_TakeDamage(victiminflictorattackerFloat:damage)
{
    new 
powers = (player_power[inflictor]/50)
    new 
extradmg powers
    SetHamParamFloat
(4damage extradmg)
    

As you can see it should basicly come out to this: normale damage × (1 + (player_power[inflictor]/50). So it should do 200% at max level (it's 50 points per skill).
When it's maxed out it actually works. But below level 50 it's all the same damage (100%). Is there a reason that it won't work correctly?

P.S. I got an error index out of bounds on the "new powers = (player_power[inflictor]/50)" line. I've tried attacker instead of inflictor aswell.
egbertjan is offline
 



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 19:38.


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