Page 1 of 1

PlayerModifiers Changing Bullet Properties Mid-Flight

Posted: Sun Mar 26, 2017 7:05 pm
by Bash Kraken
This is simple, but slightly hard to explain, so I'll give a situation:
A player fires some bullets out of their assault rifle while their ProjectileCritChanceDealtModifier is at default, causing each bullet to have a default crit chance upon being shot. However, when that player's ProjectileCritChanceDealtModifier is changed to 100% after the bullets have been fired, it changes the properties of the bullets mid-flight. This results in the bullets that originally were supposed to have a default crit having a crit chance of 100%, which could be very hard or even impossible to work around. I assume that the problem has something to do with the bullet's properties being directly tied to the players at all times, rather than just upon being fired.
http://i.imgur.com/TW6AQ6V.gif
Above is an example of myself originally having a default crit chance while firing off a few bullets from my assault rifle but then having that crit chance changed to 100% after pulling out my magnum through my script.

Re: PlayerModifiers Changing Bullet Properties Mid-Flight

Posted: Sun Mar 26, 2017 8:14 pm
by Gurt
It's actually by design right now.
The ProjectileCritChanceDealtModifier and ProjectileDamageDealtModifier are read from the projectile's owner at the point of impact. We intend to use these in the future but we do not intend to change the modifiers "live" like you do on players.

You could suggest a change in the behavior and state why you want it in a new thread in the ScriptAPI forum as this is not a bug :)