Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class CKNGBulletCam extends CR4Player {
- private var slowMoFactor : float;
- private var dodgeRollSlowMoFactor : float;
- private var evadeStepSlowMoFactor : float;
- private var counterAttackSlowMoFactor : float;
- private var criticalHitSlowMoFactor : float;
- private var dismemberSlowMoFactor : float;
- private var criticalHitSlowMoChance : Int32;
- private var rolling : string;
- private var evading : string;
- private var counterattack : string;
- private var criticalhit : string;
- private var dismember : string;
- public function RandomFactor() : Int32 {
- var i : Int32;
- var Min : Int32;
- var Max : Int32;
- var Value : Int32;
- i = 0;
- Min = 0;
- Max = 100;
- for(i = 0; i < 1; i+=1) {
- Value = RandRange(Max, Min);
- }
- return Value;
- }
- public function SlowMoCam (isActive : bool, optional actionname : string) {
- rolling = "rolling";
- evading = "evading";
- counterattack = "counterattack";
- criticalhit = "criticalhit";
- dismember = "dismember";
- criticalHitSlowMoChance = 25;
- dodgeRollSlowMoFactor = 1.0f;
- evadeStepSlowMoFactor = 1.0f;
- counterAttackSlowMoFactor = 0.5f;
- criticalHitSlowMoFactor = 0.2f;
- dismemberSlowMoFactor = 0.2;
- if (isActive && actionname == rolling) {
- theGame.SetTimeScale(dodgeRollSlowMoFactor, theGame.GetTimescaleSource(7), theGame.GetTimescalePriority(7), true);
- }
- if (isActive && actionname == evading) {
- theGame.SetTimeScale(evadeStepSlowMoFactor, theGame.GetTimescaleSource(7), theGame.GetTimescalePriority(7), true);
- }
- if (isActive && actionname == counterattack) {
- theGame.SetTimeScale(counterAttackSlowMoFactor, theGame.GetTimescaleSource(7), theGame.GetTimescalePriority(7), true);
- }
- if (isActive && actionname == criticalhit && RandomFactor() < criticalHitSlowMoChance) {
- theGame.SetTimeScale(criticalHitSlowMoFactor, theGame.GetTimescaleSource(7), theGame.GetTimescalePriority(7), true);
- }
- if (isActive && actionname == dismember) {
- theGame.SetTimeScale(dismemberSlowMoFactor, theGame.GetTimescaleSource(7), theGame.GetTimescalePriority(7), true);
- }
- if (!isActive) {
- theGame.RemoveTimeScale(theGame.GetTimescaleSource(7));
- }
- }
- public timer function DeactivateSlowMoCam(dt : float, id : int) {
- SlowMoCam(false);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement