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 00049 00050 00051 00052 00053 00054 00055 |
class AbilityBuildingPoints extends RPGAbility config(UT2004RPG) abstract; static simulated function int Cost(RPGPlayerDataObject Data, int CurrentLevel) { local bool ok; local int x; for (x = 0; x < Data.Abilities.length; x++) if (Data.Abilities[x] == class'ClassEngineer') ok = true; if(!ok) { if(CurrentLevel > 0) log("Warning:"@data.Name@"has"@default.class@"Level"@CurrentLevel@"but does not have an associated Class to allow them to purchase it"); return 0; } return super.Cost(Data, CurrentLevel); } static function ModifyPawn(Pawn Other, int AbilityLevel) { local EngineerPointsInv Inv; if(Monster(Other) != None) return; //Not for pets Inv = EngineerPointsInv(Other.FindInventoryType(class'EngineerPointsInv')); if(Inv != None) { if(Inv.TotalBuildingPoints == AbilityLevel) return; } else { Inv = Other.spawn(class'EngineerPointsInv', Other,,, rot(0,0,0)); if(Inv == None) return; //get em next pass I guess? Inv.giveTo(Other); } Inv.TotalBuildingPoints = AbilityLevel; } defaultproperties { AbilityName="Building Points" Description="Allows you to summon Buildings with the loaded engineer skill. (Max Level: 20)|You must be an Engineer to purchase this skill.|Cost (per level): 2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21" StartingCost=2 CostAddPerLevel=1 MaxLevel=20 } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |