New to the forum? Say hello in this topic! Make sure to read the rules.
RULE NR 3 UPDATED: Don't hurt, harass or provoke other forum members or people.

PlayerModifiers Changing Bullet Properties Mid-Flight

All bugs that's actually by design. This is to separate "solved bugs" from "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
Superfighter
Superfighter
Posts: 66
Joined: Tue Mar 22, 2016 12:49 pm
Title: Action Hero Extraordinaire
SFD Alias: Bash Kraken
Location: Post-Apocalyptic East Coast - U.S.
Gender:

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

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

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
Gurt

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest