Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.

New to the forum? Say hello in this topic! Also make sure to read the rules.

PlayerModifiers Changing Bullet Properties Mid-Flight

All reported bugs that's actually by design.
Forum rules
By using the forum you agree to the following rules. For this forum you also need to follow these additional rules.
Post Reply
User avatar
Bash Kraken
Posts: 75
Joined: Tue Mar 22, 2016 12:49 pm
Title: Action Hero Extraordinaire
SFD Alias: Bash Kraken
Started SFD: December 2012
Location: Post-Apocalyptic East Coast - U.S.

PlayerModifiers Changing Bullet Properties Mid-Flight

Post by Bash Kraken » Sun Mar 26, 2017 7:05 pm

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.
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.
3 x
Hidden Content
This board requires you to be registered and logged-in to view hidden content.

User avatar
Lead Programmer
Lead Programmer
Posts: 1243
Joined: Sun Feb 28, 2016 3:22 pm
Title: Lead programmer
Started SFD: Made it!
Location: Sweden
Age: 28

Post by Gurt » Sun Mar 26, 2017 8:14 pm

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 :)
0 x

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest