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 |
// Defaults defined in Campaign.ini // A new object with default values is saved in TribesGUIConfig when a new campaign is started. // Reference the object in TribesGUIConfig for the current state of the campaign. class CampaignInfo extends Core.Object PerObjectConfig config(Campaign); struct MissionInfo { var() string startCutsceneMap; var() string startCutsceneName; var() string endCutsceneMap; var() string endCutsceneName; var() string mapName; var() bool bPersist; }; // !!! remember to add any variables to the 'copy' function var() config Array<MissionInfo> missions; // defines the campaign structure var() config int progressIdx "The index of the current campaign mission"; var() config int highestProgressIdx "The furthest the player has gotten in the game."; var() config int selectedDifficulty; // Given a mapname, returns an index into the campaign. Returns -1 if no such mission exists in the campaign. function int findMission(coerce string mapName) { local int i; for (i = 0; i < missions.Length; i++) { if (Caps(mapName) == Caps(missions[i].mapName)) { return i; } } return -1; } // duplicates the object function copy(CampaignInfo dest) { local int i; if (dest == None) return; dest.progressIdx = progressIdx; dest.highestProgressIdx = highestProgressIdx; dest.selectedDifficulty = selectedDifficulty; dest.missions.Length = 0; for (i = 0; i < missions.Length; i++) { dest.missions.Length = i + 1; dest.missions[dest.missions.Length - 1].startCutsceneMap = missions[i].startCutsceneMap; dest.missions[dest.missions.Length - 1].startCutsceneName = missions[i].startCutsceneName; dest.missions[dest.missions.Length - 1].endCutsceneMap = missions[i].endCutsceneMap; dest.missions[dest.missions.Length - 1].endCutsceneName = missions[i].endCutsceneName; dest.missions[dest.missions.Length - 1].mapName = missions[i].mapName; dest.missions[dest.missions.Length - 1].bPersist = missions[i].bPersist; } } defaultproperties { selectedDifficulty = 1 } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |