#Weapon Stats canvas showing incorrect information

1 messages · Page 1 of 1 (latest)

normal phoenix
#

holding MinceMakergun, about to pick up QuadBurst look at the stats being shown

#

picked up quad burst, mince maker now on the floor

#

these stats dont make sense, does anyone know what i've done wrong?

#

its mainly the arrows that are incorrect on the right hand side

dim scarab
# normal phoenix these stats dont make sense, does anyone know what i've done wrong?
float critMultiplier = (critDamage / damage) * 100;
float currentWeaponCrit = (float)currentWeaponConfig.HeadShotDamage / (float)currentWeaponConfig.Damage;

SetStatIndicator(critMultiplier, currentWeaponCrit, critArrow);
``` critMultiplier is always 100 times larger than the other, ```cs
float fireRate = 1f / config.FireRate;
float currentWeaponFireRate = 1f / currentWeaponConfig.FireRate;

SetStatIndicator(config.FireRate, currentWeaponFireRate, fireRateArrow);
``` doesn't even use the defined fireRate variable, or if you didn't mean to do that anyway then you're comparing new fire rate to 1 / fire rate
#

also dunno why but damage, spread, reload speed and consumption rate don't seem to work at all

normal phoenix
#

ah crit yea! i did just change firerate just now, must of forgot about that bit

#

like you say, unsure why damage, spread and reload just arnt working

random ferry
#

Tom I have to critique the whole design of this script. Why doesnt the data for the canvas come from one source? Like why do you have to do calculations when initing the canvas? Also cant you make the rarity enum into a struct and have it carry its color info and what not and avoid tje whole switch thing

#

Also why not implement Icomparable on your weapon data and return a array from that operation that tells you the stats comps like -1 worse 0 same 1 better

normal phoenix
normal phoenix
#

I just dont know why its broken

random ferry
#

Its hard for me to even read

#

Im trying to spot the bug as well

normal phoenix
normal phoenix
#

I fixed it