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 00085 00086 00087 00088 00089 00090 00091 00092 00093 00094 |
//============================================================================= // ASOBJ_EnergyCore_Delivery //============================================================================= // Created by Laurent Delayen (C) 2003 Epic Games //============================================================================= class ASOBJ_EnergyCore_Delivery extends ProximityObjective; #exec OBJ LOAD FILE=AnnouncerAssault.uax var GameObject_EnergyCore EC; function bool IsRelevant( Pawn Instigator, bool bAliveCheck ) { Local PlayerReplicationInfo PRI; PRI = Instigator.PlayerReplicationInfo; if ( super.IsRelevant( Instigator, bAliveCheck ) && (PRI != None) && (PRI.HasFlag != None) && PRI.HasFlag.IsA('GameObject_EnergyCore') ) return true; return false; } /* triggered by intro cinematic to auto complete objective */ function CompleteObjective( Pawn Instigator ) { super.DisableObjective( Instigator ); } function DisableObjective(Pawn Instigator) { local PlayerReplicationInfo PRI; local GameObject_EnergyCore EnergyCore; PRI = Instigator.PlayerReplicationInfo; if ( !IsActive() || PRI == None || PRI.HasFlag == None || !PRI.HasFlag.IsA('GameObject_EnergyCore') ) return; EnergyCore = GameObject_EnergyCore(PRI.HasFlag); EnergyCore.ClearHolder(); EnergyCore.Destroy(); super.DisableObjective( Instigator ); } /* TellBotHowToDisable() tell bot what to do to disable me. return true if valid/useable instructions were given */ function bool TellBotHowToDisable(Bot B) { if ( B.PlayerReplicationInfo.HasFlag != None ) { if ( EC == None ) EC = GameObject_EnergyCore(B.PlayerReplicationInfo.HasFlag); B.GoalString = "Take Energy Core to vehicle"; return B.Squad.FindPathToObjective(B,self); } if ( EC == None ) { ForEach DynamicActors(class'GameObject_EnergyCore', EC) break; if ( EC == None ) { log("NO ENERGY CORE"); return false; } } if ( EC.Holder != None ) { B.GoalString = "Protect Energy Core holder"; if ( VSize(EC.Holder.Location - B.Pawn.Location) < 1200 ) return false; return B.Squad.FindPathToObjective(B,EC.Holder); } B.GoalString = "Go pick up Energy Core"; return B.Squad.FindPathToObjective(B,EC); } defaultproperties { Announcer_DisabledObjective=AnnouncerAssault.JY_vehicle_Operational Announcer_ObjectiveInfo=AnnouncerAssault.JY_return_core Announcer_DefendObjective=AnnouncerAssault.JY_PreventVehicleRepair DefenderTeamIndex=1 ObjectiveName="Energy Core Delivery" } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |