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 |
//This holds and maintains the list of the local player's enemy pawns for use in AwarenessInteraction //A seperate actor is used to prevent invalid pointer problems since Actor references //in non-Actors don't get set to None automatically when the Actor is destroyed class AwarenessEnemyList extends Actor; var array<Pawn> Enemies; var PlayerController PlayerOwner; simulated function PostBeginPlay() { Super.PostBeginPlay(); PlayerOwner = Level.GetLocalPlayerController(); if (PlayerOwner != None) SetTimer(2, true); else Warn("AwarenessEnemyList spawned with no local PlayerController!"); } simulated function Timer() { local Pawn P, PlayerDriver; Enemies.length = 0; if (PlayerOwner.Pawn == None || PlayerOwner.Pawn.Health <= 0) return; if (Vehicle(PlayerOwner.Pawn) != None) PlayerDriver = Vehicle(PlayerOwner.Pawn).Driver; foreach DynamicActors(class'Pawn', P) if ( P != PlayerOwner.Pawn && P != PlayerDriver && (P.IsA('Monster') || P.GetTeamNum() == 255 || P.GetTeamNum() != PlayerOwner.GetTeamNum()) && (Vehicle(P) == None || (Vehicle(P).bDriving && P.GetVehicleBase() == None)) ) Enemies[Enemies.length] = P; } defaultproperties { bHidden=True RemoteRole=ROLE_None bGameRelevant=True bBlockZeroExtentTraces=False bBlockNonZeroExtentTraces=False } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |