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 00056 00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069 00070 00071 00072 00073 00074 00075 00076 00077 00078 00079 00080 00081 00082 00083 00084 |
class AbilityMedicAwareness extends RPGAbility 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'AbilityLoadedHealing') if (Data.AbilityLevels[x] == 3) ok = true; } if (!ok) return 0; else return Super.Cost(Data, CurrentLevel); } static simulated function ModifyPawn(Pawn Other, int AbilityLevel) { local int x; local PlayerController PC; local MedicAwarenessInteraction Interaction; if (Other.Level.NetMode == NM_DedicatedServer) return; PC = PlayerController(Other.Controller); if (PC == None) return; for (x = 0; x < PC.Player.LocalInteractions.length; x++) { if (MedicAwarenessInteraction(PC.Player.LocalInteractions[x]) != None) { Interaction = MedicAwarenessInteraction(PC.Player.LocalInteractions[x]); break; } } if (Interaction == None) AddInteraction(PC,AbilityLevel); else if(Interaction.AbilityLevel != AbilityLevel) { Interaction.NotifyLevelChange(); AddInteraction(PC,AbilityLevel); } } static simulated function AddInteraction(PlayerController PC,int AbilityLevel) //modified from MonsterPointsInv.uc { local Player Player; local MedicAwarenessInteraction Interaction; Interaction = new class'MedicAwarenessInteraction'; Player = PC.Player; if (Interaction != None) { Player.LocalInteractions.Length = Player.LocalInteractions.Length + 1; Player.LocalInteractions[Player.LocalInteractions.Length-1] = Interaction; Interaction.ViewportOwner = Player; // Initialize the Interaction Interaction.Initialize(); Interaction.Master = Player.InteractionMaster; Interaction.AbilityLevel = AbilityLevel; } else Log("Could not create MedicAwarenessInteraction"); } // AddInteraction defaultproperties { AbilityName="Medic Awareness" Description="Informs you of your friends' health with a display over their heads. At level 1 you get a small dully-colored indicator - blue for very healthy, green for reasonably healthy, yellow for hurt, and then red for near death. At level 2 you get a larger and more brightly colored health bar with a white background, that shrinks and changes colors as the target gains health. The bar will turn a full solid blue if the target is fully healed. You need to be a Loaded Medic level 3 to purchase this skill. Cost per level: 10, 15. (Max Level: 2)" StartingCost=10 CostAddPerLevel=5 BotChance=0 MaxLevel=2 } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |