This is the damage modifying script for the Stat Mut
If you have followed this tutorial in order, go back to the file SPSMinigunFire you created earlier. Add this line of code:
function ModeTick(float dt) { if (StatPoints > 0) DamageMin = default.DamageMin + (StatPoints / 5) DamageMax = default.DamageMax + (StatPoints / 5) else DamageMin = default.DamageMin DamageMax = default.DamageMax }
So that this:
simulated function PostBeginPlay() { Super.PostBeginPlay(); FireRate = 1.f / (RoundsPerRotation * BarrelRotationsPerSec); MaxRollSpeed = 65536.f*BarrelRotationsPerSec; Gun = Minigun(Owner); function ModeTick(float dt) { if (StatPoints > 0) { NewFireRate = FireRate + (StatPoints / 5); else FireRate = 1.f / (RoundsPerRotation * BarrelRotationsPerSec); } } }
Will look like this:
simulated function PostBeginPlay() { Super.PostBeginPlay(); FireRate = 1.f / (RoundsPerRotation * BarrelRotationsPerSec); MaxRollSpeed = 65536.f*BarrelRotationsPerSec; Gun = Minigun(Owner); function ModeTick(float dt) { if (StatPoints > 0) { DamageMin = default.DamageMin + (StatPoints / 5) DamageMax = default.DamageMax + (StatPoints / 5) else DamageMin = default.DamageMin DamageMax = default.DamageMax } if (StatPoints > 0) { NewFireRate = FireRate + (StatPoints / 5); else FireRate = 1.f / (RoundsPerRotation * BarrelRotationsPerSec); } } }
For people who havn't done the original Tutorial, go here:
Any comments or revisions would be helpful.
Comments
Related Topics
Page Categories
Page Information
2022-11-22T02:14:21.648362Z
2003-10-12T05:47:54Z
Dragonmaw
*
https://wiki.beyondunreal.com/Legacy:Stat Points System/Damage Modifier
Attribution-NonCommercial-ShareAlike 3.0