Suggestion: Bullet Values Read from Owner Upon Being Fired
Posted: Sun Mar 26, 2017 9:27 pm
I understand that PlayerModifiers are not necessarily meant to be applied "live," but the freedom live changing of PlayerModifiers gives scripters is very important when dealing with projectiles. For example:
Say I want to make a map with a CPU character who has ProjectileDamageDealtModifier of 2 while using most small damage guns like the pistol. This makes this particular CPU a harder opponent, simply because his projectile damage is higher. However, say I also want the CPU to use the sniper rifle, but I don't want him to possibly do 90 damage. Switching his ProjectileDamageDealtModifier back to default is simple enough, but doing so now creates the highly likely possibility of his pistol bullets that are still on their collision course do default damage instead of double. Of course I could always wait a set amount of time before changing his ProjectileDamageDealtModifier, but this causes other issues. If I want a double damage pistol shot to be quickly followed by a normal sniper shot, I cannot do this completely reliably. If I want to change his ProjectileDamageDealtModifier for multiple weapons, it presents the same problem on a larger scale with even more small highly possible inconsistencies.
All of this can be solved by simply reading all of the values necessary for each bullet at the time each bullet is fired. This does not affect any existing plans for PlayerModifiers, even though they are not meant to be applied live. It is truly just a way to give more freedom to scripters while also keeping the original intention for PlayerModifiers solid. It is even possible that reading values upon a bullet being fired or reading values on impact could be an option done through scripting, allowing for even more options for both the Devs and scripters.
Say I want to make a map with a CPU character who has ProjectileDamageDealtModifier of 2 while using most small damage guns like the pistol. This makes this particular CPU a harder opponent, simply because his projectile damage is higher. However, say I also want the CPU to use the sniper rifle, but I don't want him to possibly do 90 damage. Switching his ProjectileDamageDealtModifier back to default is simple enough, but doing so now creates the highly likely possibility of his pistol bullets that are still on their collision course do default damage instead of double. Of course I could always wait a set amount of time before changing his ProjectileDamageDealtModifier, but this causes other issues. If I want a double damage pistol shot to be quickly followed by a normal sniper shot, I cannot do this completely reliably. If I want to change his ProjectileDamageDealtModifier for multiple weapons, it presents the same problem on a larger scale with even more small highly possible inconsistencies.
All of this can be solved by simply reading all of the values necessary for each bullet at the time each bullet is fired. This does not affect any existing plans for PlayerModifiers, even though they are not meant to be applied live. It is truly just a way to give more freedom to scripters while also keeping the original intention for PlayerModifiers solid. It is even possible that reading values upon a bullet being fired or reading values on impact could be an option done through scripting, allowing for even more options for both the Devs and scripters.