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 00095 00096 00097 00098 00099 00100 00101 00102 00103 00104 00105 00106 00107 00108 00109 00110 00111 00112 |
/* -------------------------------------------------------------- Action_GoToNextObjective -------------------------------------------------------------- This Action changes the current objective to the next one in the sorted Objectives list defined in the Level Rules actor. Author : Alex Quick -------------------------------------------------------------- */ class ObjAction_GoToNextObjective extends ObjAction_GoToObjective hideCategories(KF_ObjectiveAction) editinlinenew; /* Offset to apply to ObjectiveIndex. ie. We want to skip forward to the next,NEXT objective. (offset=1) */ var () int Offset; /* if not null, Go to the next objective that has this tag */ var () name NextObjTag; /* At Runtime query the gameinfo to figure out what the next objective is. Otherwise use the list in the levelinfo */ function name GetTargetObj() { local array<StoryObjectiveBase> ObjectiveList; local int i,ObjIdx; if(GetObjOwner() != none && GetObjOwner().StoryGI != none) // runtime. { ObjectiveList = GetObjOwner().StoryGI.SortedObjectives ; ObjIdx = GetObjOwner().StoryGI.CurrentObjectiveIdx; } if(NextObjTag == '') { return ObjectiveList[ ObjIdx + (1 + Offset) ].ObjectiveName ; } else { for(i = (ObjIdx + (1 + Offset)) ; i < ObjectiveList.length ; i ++) { if(ObjectiveList[i].tag == NextObjTag) { return ObjectiveList[i].ObjectiveName; } } } log("Warning - Could not find any objectives with tag : "@NextObjTag@" in the Sorted Objectives array."@self@" will fail. "); return ''; } function StoryObjectiveBase GetNextEditorObj(StoryObjectiveBase Sender, array<StoryObjectiveBase> ObjList) { local int i,idx,ObjIdx; local LevelInfo LI; local array<StoryObjectiveBase> SortedObjList; if(Sender == none) { return none; } LI = Sender.Level ; /* Build a list of the linear objectives in the map */ SortedObjList.length = LI.StoryObjectives.length; for(i = 0 ; i < ObjList.length ; i ++) { for(idx = 0 ; idx < LI.StoryObjectives.length ; idx++) { if(ObjList[i].ObjectiveName == LI.StoryObjectives[idx]) { SortedObjList[idx] = ObjList[i] ; } if(SortedObjList[idx] == Sender) { ObjIdx = idx; } } } ObjList = SortedObjList; if(NextObjTag == '') { return ObjList[ ObjIdx + (1 + Offset) ]; } else { for(i = (ObjIdx + (1 + Offset)) ; i < ObjList.length ; i ++) { if(ObjList[i].tag == NextObjTag) { return ObjList[i]; } } } return none; } defaultproperties { } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |