Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 00048 |
class AbilityFastWeaponSwitch extends RPGAbility abstract; static simulated function int Cost(RPGPlayerDataObject Data, int CurrentLevel) { if (Data.WeaponSpeed < 50) return 0; else return Super.Cost(Data, CurrentLevel); } static simulated function ModifyWeapon(Weapon Weapon, int AbilityLevel) { local float Modifier; local RPGWeapon RW; if (!Weapon.Instigator.IsLocallyControlled()) return; Modifier = 1.0 + (0.5 * AbilityLevel); RW = RPGWeapon(Weapon); if (RW != None) { RW.ModifiedWeapon.BringUpTime = RW.ModifiedWeapon.default.BringUpTime / Modifier; RW.ModifiedWeapon.PutDownTime = RW.ModifiedWeapon.default.PutDownTime / Modifier; RW.ModifiedWeapon.MinReloadPct = RW.ModifiedWeapon.default.MinReloadPct / Modifier; RW.ModifiedWeapon.PutDownAnimRate = RW.ModifiedWeapon.default.PutDownAnimRate * Modifier; RW.ModifiedWeapon.SelectAnimRate = RW.ModifiedWeapon.default.SelectAnimRate * Modifier; } else { Weapon.BringUpTime = Weapon.default.BringUpTime / Modifier; Weapon.PutDownTime = Weapon.default.PutDownTime / Modifier; Weapon.MinReloadPct = Weapon.default.MinReloadPct / Modifier; Weapon.PutDownAnimRate = Weapon.default.PutDownAnimRate * Modifier; Weapon.SelectAnimRate = Weapon.default.SelectAnimRate * Modifier; } } defaultproperties { AbilityName="Speed Switcher" Description="For each level of this ability, you switch weapons 50% faster. You need to have at least 50 Weapon Speed before you can purchase this ability. (Max Level: 2)" StartingCost=15 CostAddPerLevel=5 MaxLevel=2 BotChance=3 } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |