• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Code Changing projectile speed

Proton

Member
Feb 28, 2015
5
0
I'm at my wit's end. Ultimately all I want to do is make bullets travel faster in zed time.

  1. I can't use a mutator to increase projectile speed directly because projectiles don't call CheckRelevance/IsRelevant/CheckReplacement.
  2. Instead I subclassed a few projectiles with higher speed (I also tried lower speed) in the defaultproperties, and wrote a mutator that changes each weapon, upon spawning, to fire these subclassed projectiles.
  3. I know this mutator is functioning, because it outputs to the script log correctly and shows the values I expect, even when double-checking the variables a split second after their actual spawn.
  4. However, regardless of the subclassed projectile's actual Speed and Velocity, it's always moving the normal KF2 speed during zed time.
  5. I haven't been able to find any other functions or variables that might override the core Speed/Velocity variables.

Please help me T_T
 
Offline: You can simply use Mutator.CheckReplacement to set KFWeapon.WeaponProjectiles[Mode] to a custom projectile that extends off each individual projectile class (for example KFProj_Bullet_Pistol9mm). And for that projectile you must define a new Speed and MaxSpeed in defaultproperties.

Online: You must replace all of weapon instances too. To do that you must replace the InventoryManager class player uses and override CreateInventory to spawn the custom weapon classes instead. Otherwise clients will desync.
 
Upvote 0