//================================================================================================== // // Generated Map Script // // Name: // Author: // //================================================================================================== include "TriggerLibs/NativeLib" //-------------------------------------------------------------------------------------------------- // Library Initialization //-------------------------------------------------------------------------------------------------- void InitLibs () { libNtve_InitLib(); } //-------------------------------------------------------------------------------------------------- // Trigger Variables //-------------------------------------------------------------------------------------------------- trigger gt_GLOBALSSTRUCTS; trigger gt_BASICFUNCTIONS; trigger gt_MeleeInitialization; trigger gt_Mainfunctions; trigger gt_WEAPONFUNCTIONS; trigger gt_ButtonPress; trigger gt_Initialization; //-------------------------------------------------------------------------------------------------- // Trigger: GLOBALS & STRUCTS //-------------------------------------------------------------------------------------------------- bool gt_GLOBALSSTRUCTS_Func (bool testConds, bool runActions) { // Actions if (!runActions) { return true; } return true;} struct Weapon { string name; string icon; int ammo; fixed cooldown; fixed missileSpeed; string missileType; string impactEffect; bool effectOnTimeout; string crosshairType; int crosshairSize; bool instant; fixed inaccuracy; soundlink launchSound; soundlink impactSound; string description; string statsIncFunction; int[4] statsCurrent; int[4] statsMax; int[4] statsBaseCost; int[4] statsIncCost; int UpgradeTabAmount; string[6] UpgradeTabsTitle; bool[6] UpgradeTabsBought; string[6] UpgradeTabsIcon; string[6] UpgradeTabsDescription; int[6] UpgradeTabsCost; color[6] UpgradeTabsPurchasedColor; string UpgradeAddFunction; }; Weapon[4] Guns; const color COLOR_WHITE=Color(100,100,100); const color COLOR_ORANGE=Color(99,54,5); const color COLOR_GREEN=Color(9,50,0); const color COLOR_BLUE=Color(0,26,100); const color COLOR_RED=Color(100,0,0); playergroup PLAYER_GROUP_USER=PlayerGroupSingle(1); //Pseudo-constant text NO_TEXT=StringToText(""); text TEXT_DOLLAR=StringToText("$"); string[2] gTempString; //Temps for new-thread executions, just about as much as I need point[1] gTempPoint; int[1] gTempInt; fixed[2] gTempFixed; bool DUMMYFUNCTION1() { return true; } //-------------------------------------------------------------------------------------------------- void gt_GLOBALSSTRUCTS_Init () { gt_GLOBALSSTRUCTS = TriggerCreate("gt_GLOBALSSTRUCTS_Func"); } //-------------------------------------------------------------------------------------------------- // Trigger: BASIC FUNCTIONS //-------------------------------------------------------------------------------------------------- bool gt_BASICFUNCTIONS_Func (bool testConds, bool runActions) { // Actions if (!runActions) { return true; } return true;} void DEBUGSTRING(string s){ UIDisplayMessage(PLAYER_GROUP_USER, c_messageAreaSubtitle, StringToText(s)); } void RunFunction(string itemString){ //Replacement for the Action Definitions trigger t = TriggerCreate(itemString); TriggerExecute(t, false, false); TriggerDestroy(t); } bool DUMMYFUNCTION2() { return true; } //-------------------------------------------------------------------------------------------------- void gt_BASICFUNCTIONS_Init () { gt_BASICFUNCTIONS = TriggerCreate("gt_BASICFUNCTIONS_Func"); } //-------------------------------------------------------------------------------------------------- // Trigger: Set Weapons //-------------------------------------------------------------------------------------------------- bool gt_MeleeInitialization_Func (bool testConds, bool runActions) { // Variable Declarations int lv_i; int lv_c; // Variable Initialization lv_i = 0; lv_c = 0; // Actions if (!runActions) { return true; } // Custom weapon set-up. // //////////////////////////////////////////////////////////// /////=============== Gauss Pistol ===============///// //////////////////////////////////////////////////////////// lv_i=0; Guns[lv_i].name="Gauss Pistol"; //Name of the weapon Guns[lv_i].icon="Assets\\Textures\\btn-upgrade-terran-infantryweaponslevel2.dds"; //Icon of the weapon Guns[lv_i].ammo=200; // Not in use in the upgrade menu Guns[lv_i].cooldown=0.25; // Not in use in the upgrade menu Guns[lv_i].missileSpeed=25; // Not in use in the upgrade menu Guns[lv_i].missileType="HydraliskGroundWeapon"; // Not in use in the upgrade menu Guns[lv_i].impactEffect="Reaper"; // Not in use in the upgrade menu Guns[lv_i].effectOnTimeout=true; // Not in use in the upgrade menu Guns[lv_i].crosshairType="EditorData\\Images\\MinimapStartLocation.tga"; // Not in use in the upgrade menu Guns[lv_i].crosshairSize=26; // Not in use in the upgrade menu Guns[lv_i].instant=true; // Not in use in the upgrade menu Guns[lv_i].inaccuracy=0.5; // Not in use in the upgrade menu Guns[lv_i].launchSound=SoundLink("Reaper_AttackLaunch", -1); // Not in use in the upgrade menu Guns[lv_i].impactSound=SoundLink("Reaper_AttackImpact", -1); // Not in use in the upgrade menu Guns[lv_i].description="These Gauss Pistols are given to Reapers who've completed their initiation. Their firing speed and damage is second to no other pistol."; //Description of the gun Guns[lv_i].statsCurrent[0]=2; // Initial stats. Can be set to 0 for a non-upgraded gun Guns[lv_i].statsCurrent[1]=1; Guns[lv_i].statsCurrent[2]=1; Guns[lv_i].statsCurrent[3]=0; Guns[lv_i].statsMax[0]=5; //Max stats. This number should not be less than the respective statsCurrent Guns[lv_i].statsMax[1]=4; Guns[lv_i].statsMax[2]=4; Guns[lv_i].statsMax[3]=1; Guns[lv_i].statsBaseCost[0]=100; //Base cost for stats upgrade Guns[lv_i].statsBaseCost[1]=100; Guns[lv_i].statsBaseCost[2]=100; Guns[lv_i].statsBaseCost[3]=250; Guns[lv_i].statsIncCost[0]=75; //Every time you upgrade a stat it's cost will increase by this amount Guns[lv_i].statsIncCost[1]=80; Guns[lv_i].statsIncCost[2]=60; Guns[lv_i].statsIncCost[3]=0; Guns[lv_i].statsIncFunction="GaussPistolsStatsInc"; //Function that is called when this weapon stats are upgraded Guns[lv_i].UpgradeAddFunction="GaussPistolsUpgradeAdd"; //Function that is called when this weapon gets a upgrade lv_c=0; Guns[lv_i].UpgradeTabsTitle[lv_c]="Machine Pistols"; //Upgrade name Guns[lv_i].UpgradeTabsBought[lv_c]=false; //Has been bought? Guns[lv_i].UpgradeTabsIcon[lv_c]="Assets\\Textures\\btn-upgrade-terran-infantryweaponslevel1.dds"; //Icon Guns[lv_i].UpgradeTabsDescription[lv_c]="Dukes the gun up pretty much, making them like machine piztols."; //Description Guns[lv_i].UpgradeTabsCost[lv_c]=1500; //Cost Guns[lv_i].UpgradeTabsPurchasedColor[lv_c]=COLOR_WHITE; //The icon changes color when being bought. It's white if it hasn't been bought. Use COLOR_WHITE for icons that are not supposed to change color lv_c+=1; Guns[lv_i].UpgradeTabsTitle[lv_c]="Inferno Ammo"; Guns[lv_i].UpgradeTabsBought[lv_c]=false; Guns[lv_i].UpgradeTabsIcon[lv_c]="Assets\\Textures\\btn-techupgrade-terran-bearclawnozzles.dds"; Guns[lv_i].UpgradeTabsDescription[lv_c]="Fight fire with fire. These inferno rounds incinerate on impact."; Guns[lv_i].UpgradeTabsCost[lv_c]=1250; Guns[lv_i].UpgradeTabsPurchasedColor[lv_c]=COLOR_RED; //That upgrade icon changes it's color to red once it's upgraded, looks pretty cool // Guns[lv_i].UpgradeTabAmount=lv_c+1; //////////////////////////////////////////////////////////// /////=============== Particle Disruptor ===============///// //////////////////////////////////////////////////////////// lv_i+=1; Guns[lv_i].name="Particle Disruptor"; Guns[lv_i].icon="Assets\\Textures\\btn-upgrade-protoss-airweaponslevel3.dds"; Guns[lv_i].ammo=100; Guns[lv_i].cooldown=0.5; Guns[lv_i].missileSpeed=18; Guns[lv_i].missileType="StalkerWeapon"; Guns[lv_i].impactEffect="StalkerU"; Guns[lv_i].effectOnTimeout=false; Guns[lv_i].crosshairType="EditorData\\Images\\BrushWaterAdd.tga"; Guns[lv_i].crosshairSize=16; Guns[lv_i].instant=false; Guns[lv_i].inaccuracy=0.25; Guns[lv_i].launchSound=SoundLink("Stalker_AttackLaunch", -1); Guns[lv_i].impactSound=SoundLink("Stalker_AttackImpact", -1); Guns[lv_i].description="Particle disruptors are carried by Stalkers, but whhen connected to a power battery it can be used by anyone!"; Guns[lv_i].statsCurrent[0]=1; Guns[lv_i].statsCurrent[1]=2; Guns[lv_i].statsCurrent[2]=2; Guns[lv_i].statsCurrent[3]=0; Guns[lv_i].statsMax[0]=3; Guns[lv_i].statsMax[1]=4; Guns[lv_i].statsMax[2]=4; Guns[lv_i].statsMax[3]=1; Guns[lv_i].statsBaseCost[0]=100; Guns[lv_i].statsBaseCost[1]=100; Guns[lv_i].statsBaseCost[2]=100; Guns[lv_i].statsBaseCost[3]=250; Guns[lv_i].statsIncCost[0]=75; Guns[lv_i].statsIncCost[1]=80; Guns[lv_i].statsIncCost[2]=60; Guns[lv_i].statsIncCost[3]=0; Guns[lv_i].UpgradeTabsTitle[0]="Particle Acceleration"; Guns[lv_i].UpgradeTabsBought[0]=false; Guns[lv_i].UpgradeTabsIcon[0]="Assets\\Textures\\btn-upgrade-protoss-airweaponslevel2.dds"; Guns[lv_i].UpgradeTabsDescription[0]="Makes fun like hell to shoot with an accerlerated particle disruptor"; Guns[lv_i].UpgradeTabsCost[0]=1050; Guns[lv_i].UpgradeTabsPurchasedColor[0]=COLOR_WHITE; // Guns[lv_i].UpgradeTabAmount=1; //////////////////////////////////////////////////////////// /////=============== Acid Spitter ===============///// //////////////////////////////////////////////////////////// lv_i+=1; Guns[lv_i].name="Acid Spitter"; Guns[lv_i].icon="Assets\\Textures\\btn-upgrade-zerg-missileattacks-level0.dds"; Guns[lv_i].ammo=60; Guns[lv_i].cooldown=0.33; Guns[lv_i].missileSpeed=10; Guns[lv_i].missileType="RoachWeapon"; Guns[lv_i].impactEffect="HunterSeekerDamage"; Guns[lv_i].effectOnTimeout=true; Guns[lv_i].crosshairType="EditorData\\Images\\TimelineZoom.tga"; Guns[lv_i].crosshairSize=32; Guns[lv_i].instant=false; Guns[lv_i].inaccuracy=1.0; Guns[lv_i].launchSound=SoundLink("Roach_AttackLaunchRanged", -1); Guns[lv_i].impactSound=SoundLink("Roach_AttackImpactRanged", -1); //////////////////////////////////////////////////////////// /////=============== Nuke Launcher ===============///// //////////////////////////////////////////////////////////// lv_i+=1; Guns[lv_i].name="Nuke Launcher"; Guns[lv_i].icon="Assets\\Textures\\btn-upgrade-terran-vehicleweaponslevel3.dds"; Guns[lv_i].ammo=10; Guns[lv_i].cooldown=2.00; Guns[lv_i].missileSpeed=6; Guns[lv_i].missileType="HunterSeekerWeapon"; Guns[lv_i].impactEffect="nukeDamage"; Guns[lv_i].effectOnTimeout=true; Guns[lv_i].crosshairType="EditorData\\Images\\FootprintResMedium.tga"; Guns[lv_i].crosshairSize=28; Guns[lv_i].instant=false; Guns[lv_i].inaccuracy=0.0; Guns[lv_i].launchSound=SoundLink("Raven_HunterSeekerLaunch", -1); Guns[lv_i].impactSound=SoundLink("Raven_HunterSeekerAttackImpact", -1); return true; } //-------------------------------------------------------------------------------------------------- void gt_MeleeInitialization_Init () { gt_MeleeInitialization = TriggerCreate("gt_MeleeInitialization_Func"); TriggerAddEventMapInit(gt_MeleeInitialization); } //-------------------------------------------------------------------------------------------------- // Trigger: Main functions //-------------------------------------------------------------------------------------------------- bool gt_Mainfunctions_Func (bool testConds, bool runActions) { // Actions if (!runActions) { return true; } return true;} // // Some credits go to dest1nyCP for his Color Gradient map. // I've used his idea of making progress bars myself. // int gGameCash; // int gMainDialog; int gMainDialogTitle; int gMainDialogIcon; int gMainDialogDescription; int gMainDialogCash; // int gSelectionDialog; int[6] gSelectionDialogItems; int[6] gSelectionDialogButtons; int gSelectionCurrentItem; // int[4] gStatsBarBorders; int[4] gStatsBarContent; int[4] gStatsButtonsAdd; int[4] gStatsButtonsSubtract; int[4] gStatsBarLabels; // int[6] gUpgradeTabIcons; int[6] gUpgradeTabTitles; int[6] gUpgradeTabDescriptions; int[6] gUpgradeTabButtons; // // const string cStyleMainTitle=""; //Pseudo-constants.. again.. fucking galaxy const string cStypeMainDescription=""; const string cStyleMainCash=""; const string cStyleOff=""; const string cStyleUpgradeTabTitle=""; //libNtve_gf_SetDialogItemTooltip(DialogControlLastCreated(), StringExternal("Param/Value/677BF7B0"), PlayerGroupAll()); void ShowMainDescription(bool show){ DialogControlSetVisible(gMainDialogTitle, PLAYER_GROUP_USER, show); DialogControlSetVisible(gMainDialogIcon, PLAYER_GROUP_USER, show); DialogControlSetVisible(gMainDialogDescription, PLAYER_GROUP_USER, show); DialogControlSetVisible(gMainDialogCash, PLAYER_GROUP_USER, show); } void ShowUpgradeTab(int c, bool show){ DialogControlSetVisible(gUpgradeTabTitles[c], PLAYER_GROUP_USER, show); DialogControlSetVisible(gUpgradeTabIcons[c], PLAYER_GROUP_USER, show); DialogControlSetVisible(gUpgradeTabDescriptions[c], PLAYER_GROUP_USER, show); DialogControlSetVisible(gUpgradeTabButtons[c], PLAYER_GROUP_USER, show); } void ShowStatsBars(bool show){ int c=0; while(c<4){ DialogSetVisible(gStatsBarBorders[c], PLAYER_GROUP_USER, show); DialogControlSetVisible(gStatsBarLabels[c], PLAYER_GROUP_USER, show); DialogControlSetVisible(gStatsBarContent[c], PLAYER_GROUP_USER, show); DialogControlSetVisible(gStatsButtonsAdd[c], PLAYER_GROUP_USER, show); c+=1; } } void UpdateMainDescription(int key){ libNtve_gf_SetDialogItemText(gMainDialogTitle, StringToText(cStyleMainTitle+Guns[key].name+cStyleOff), PLAYER_GROUP_USER); libNtve_gf_SetDialogItemImage(gMainDialogIcon, Guns[key].icon, PLAYER_GROUP_USER); libNtve_gf_SetDialogItemText(gMainDialogDescription, StringToText(cStypeMainDescription+Guns[key].description+cStyleOff), PLAYER_GROUP_USER); } void UpdateStatsBars(int key){ int c=0; while(c<4){ DialogControlSetSize(gStatsBarContent[c], PLAYER_GROUP_USER, 1+FixedToInt((200*(IntToFixed(Guns[key].statsCurrent[c])/IntToFixed(Guns[key].statsMax[c])))), 20); DialogControlSetEnabled(gStatsButtonsSubtract[c], PLAYER_GROUP_USER, false); if (Guns[key].statsCurrent[c]>=Guns[key].statsMax[c]){ DialogControlSetEnabled(gStatsButtonsAdd[c], PLAYER_GROUP_USER, false); libNtve_gf_SetDialogItemTooltip(gStatsButtonsAdd[c], NO_TEXT, PLAYER_GROUP_USER); }else{ DialogControlSetEnabled(gStatsButtonsAdd[c], PLAYER_GROUP_USER, true); libNtve_gf_SetDialogItemTooltip(gStatsButtonsAdd[c], TEXT_DOLLAR+IntToText(Guns[key].statsBaseCost[c]+(Guns[key].statsCurrent[c]*Guns[key].statsIncCost[c])), PLAYER_GROUP_USER); } c+=1; } } void UpdateUpgradeTabs(int key){ //string[6] UpgradeTabsTitle; //bool[6] UpgradeTabsBought; //string[6] UpgradeTabsIcon; //string[6] UpgradeTabsDescription; int c=0; while (c=Guns[key].statsMax[c]){ DialogControlSetEnabled(gStatsButtonsAdd[c], PLAYER_GROUP_USER, false); libNtve_gf_SetDialogItemTooltip(gStatsButtonsAdd[c], NO_TEXT, PLAYER_GROUP_USER); }else if (gGameCash<(Guns[key].statsBaseCost[c]+(Guns[key].statsCurrent[c]*Guns[key].statsIncCost[c]))){ DialogControlSetEnabled(gStatsButtonsAdd[c], PLAYER_GROUP_USER, false); }else{ DialogControlSetEnabled(gStatsButtonsAdd[c], PLAYER_GROUP_USER, true); libNtve_gf_SetDialogItemTooltip(gStatsButtonsAdd[c], TEXT_DOLLAR+IntToText(Guns[key].statsBaseCost[c]+(Guns[key].statsCurrent[c]*Guns[key].statsIncCost[c])), PLAYER_GROUP_USER); } c+=1; } c=0; while (c=Guns[key].statsMax[c]){ libNtve_gf_SetDialogItemTooltip(gStatsButtonsAdd[c], TEXT_DOLLAR+IntToText(Guns[key].statsBaseCost[c]+(Guns[key].statsCurrent[c]*Guns[key].statsIncCost[c])), PLAYER_GROUP_USER); } gGameCash-=Guns[key].statsBaseCost[c]+((Guns[key].statsCurrent[c]-1)*Guns[key].statsIncCost[c]); } void BuyUpgrade(int c){ int key=gSelectionCurrentItem; gTempInt[0]=c; RunFunction(Guns[key].UpgradeAddFunction); Guns[key].UpgradeTabsBought[c]=true; gGameCash-=Guns[key].UpgradeTabsCost[c]; libNtve_gf_SetDialogItemColor(gUpgradeTabIcons[c], Guns[key].UpgradeTabsPurchasedColor[c], PLAYER_GROUP_USER); } void CreateStatsBar(int c, string label, int x, int y){ gStatsBarLabels[c]=libNtve_gf_CreateDialogItemLabel(gMainDialog, 150, 40, c_anchorTopLeft, x, y+8, StringToText(""+label+""), Color(100,100,100), false, 2.0); gStatsBarBorders[c]=DialogCreate(265, 52, c_anchorCenter, 0, 0, false); DialogSetVisible(gStatsBarBorders[c], PLAYER_GROUP_USER, true); DialogSetPositionRelative(gStatsBarBorders[c], c_anchorTopLeft, gMainDialog, c_anchorTopLeft, x+150, y); gStatsBarContent[c]=libNtve_gf_CreateDialogItemImage(gStatsBarBorders[c], 1, 20, c_anchorLeft, 31, -2, StringToText(""), "healthbar.dds", c_triggerImageTypeNormal, false, Color(20,90,20), c_triggerBlendModeNormal); DialogControlSetSize(gStatsBarContent[c], PLAYER_GROUP_USER, 200, 20); gStatsButtonsAdd[c]=libNtve_gf_CreateDialogItemButton(gMainDialog, 40, 35, c_anchorTopLeft, x+412, y+7, StringToText(""), StringToText(" + "), ""); gStatsButtonsSubtract[c]=libNtve_gf_CreateDialogItemButton(gMainDialog, 40, 35, c_anchorTopLeft, x+460, y+7, StringToText(""), StringToText(" - "), ""); } void CreateUpgradeTab(int c, int x, int y){ //int[6] gUpgradeTabIcons; //int[6] gUpgradeTabDescriptions; //int[6] gUpgradeTabButtons; gUpgradeTabIcons[c]=libNtve_gf_CreateDialogItemImage(gMainDialog, 76, 76, c_anchorTopLeft, x, y, StringToText(""), "Assets\\Textures\\btn-upgrade-terran-infantryweaponslevel2.dds", c_triggerImageTypeNormal, true, COLOR_WHITE, c_triggerBlendModeNormal); gUpgradeTabTitles[c]=libNtve_gf_CreateDialogItemLabel(gMainDialog, 230, 30, c_anchorTopLeft, x+80, y, StringToText("Veteran Baneling"), Color(100,100,100), false, 2.0); gUpgradeTabDescriptions[c]=libNtve_gf_CreateDialogItemLabel(gMainDialog, 220, 100, c_anchorTopLeft, x+80, y+30, StringToText("blab la bla bla bla blabsgdfgsfdlab la bla blablab la bla blablab la bla bla"), Color(100,100,100), false, 2.0); gUpgradeTabButtons[c]=libNtve_gf_CreateDialogItemButton(gMainDialog, 76, 44, c_anchorTopLeft, x, y+80, StringToText(""), StringToText("Buy "), ""); } void CreateSelectionButton(int c, string s, int x, int y){ gSelectionDialogItems[c]=libNtve_gf_CreateDialogItemImage(gSelectionDialog, 76, 76, c_anchorTopLeft, x+22, y, NO_TEXT, s, c_triggerImageTypeNormal, true, COLOR_WHITE, c_triggerBlendModeNormal); gSelectionDialogButtons[c]=libNtve_gf_CreateDialogItemButton(gSelectionDialog, 120, 44, c_anchorTopLeft, x, y+80, NO_TEXT, StringToText("Select "), ""); } void CreateSelectionBar() { gSelectionDialog=DialogCreate(900, 240, c_anchorTop, 0, 00, true); DialogSetVisible(gSelectionDialog, PLAYER_GROUP_USER, true); DialogSetPositionRelative(gSelectionDialog, c_anchorTop, gMainDialog, c_anchorBottom, 0, -50); CreateSelectionButton(0, Guns[0].icon, 40, 50); CreateSelectionButton(1, Guns[1].icon, 170, 50); CreateSelectionButton(2, Guns[2].icon, 300, 50); CreateSelectionButton(3, Guns[3].icon, 430, 50); CreateSelectionButton(4, Guns[0].icon, 560, 50); CreateSelectionButton(5, Guns[0].icon, 710, 50); } void InitiateMenuScreen () { gGameCash=1700; gMainDialog=DialogCreate(1150, 750, c_anchorTop, 0, 50, true); DialogSetVisible(gMainDialog, PLAYER_GROUP_USER, true); // gMainDialogTitle=libNtve_gf_CreateDialogItemLabel(gMainDialog, 700, 50, c_anchorTopLeft, 150, 60, StringToText(cStyleMainTitle+"P-38 Gauss Pistol"), Color(100,100,100), false, 2.0); gMainDialogIcon=libNtve_gf_CreateDialogItemImage(gMainDialog, 76, 76, c_anchorTopLeft, 50, 50, StringToText(""), "Assets\\Textures\\btn-upgrade-terran-infantryweaponslevel2.dds", c_triggerImageTypeNormal, true, COLOR_WHITE, c_triggerBlendModeNormal); gMainDialogCash=libNtve_gf_CreateDialogItemLabel(gMainDialog, 250, 50, c_anchorTopRight, 0, 60, StringToText(""+IntToString(gGameCash)+""), Color(100,100,100), false, 2.0); gMainDialogDescription=libNtve_gf_CreateDialogItemLabel(gMainDialog, 500, 300, c_anchorTopLeft, 600, 150, StringToText("bla bla bal blabl ldbla bla bal bla bla labl ablldf ladlf ladfl bla bal bldll "), Color(100,100,100), false, 2.0); // CreateSelectionBar(); // CreateStatsBar(0, "Atk.Speed", 75, 150); CreateStatsBar(1, " Damage", 75, 200); CreateStatsBar(2, " Velocity", 75, 250); CreateStatsBar(3, " Juice", 75, 300); // CreateUpgradeTab(0, 70, 380); CreateUpgradeTab(1, 420, 380); CreateUpgradeTab(2, 770, 380); CreateUpgradeTab(3, 70, 540); CreateUpgradeTab(4, 420, 540); CreateUpgradeTab(5, 770, 540); gSelectionCurrentItem=0; UpdateMainDescription(0); UpdateStatsBars(0); UpdateUpgradeTabs(0); UpdateAllBuyButtons(); } bool abc(){ return true; } //-------------------------------------------------------------------------------------------------- void gt_Mainfunctions_Init () { gt_Mainfunctions = TriggerCreate("gt_Mainfunctions_Func"); } //-------------------------------------------------------------------------------------------------- // Trigger: WEAPON FUNCTIONS //-------------------------------------------------------------------------------------------------- bool gt_WEAPONFUNCTIONS_Func (bool testConds, bool runActions) { // Actions if (!runActions) { return true; } return true;} // Weapon upgrade stuff. All externalized, so you can conveniently make functions for it. // //////////////////////////////////////////////////////////// /////=============== Gauss Pistol ===============///// //////////////////////////////////////////////////////////// bool GaussPistolsStatsInc(bool a, bool b){ int c=gTempInt[0]; // <- the stat index that's been upgraded if (c==0){ //Inc damage DEBUGSTRING("damage"); }else if(c==1){ //Inc speed DEBUGSTRING("speed"); }else if(c==2){ //Inc velo }else{ //Juice it up! } return true; } bool GaussPistolsUpgradeAdd(bool a, bool b){ int c=gTempInt[0]; //the upgrade index that's been upgraded if (c==0){ //Upgrade 1 DEBUGSTRING("1111111"); //Apply upgrade thing here. }else if(c==1){ //Upgrade 2 DEBUGSTRING("2222222"); }else if(c==2){ //Upgrade 3 }else{ //Upgrade 4 } return true; } bool DUMMYFUNCTION7() { return true; } //-------------------------------------------------------------------------------------------------- void gt_WEAPONFUNCTIONS_Init () { gt_WEAPONFUNCTIONS = TriggerCreate("gt_WEAPONFUNCTIONS_Func"); } //-------------------------------------------------------------------------------------------------- // Trigger: Button Press //-------------------------------------------------------------------------------------------------- bool gt_ButtonPress_Func (bool testConds, bool runActions) { // Actions if (!runActions) { return true; } return true;} bool gt_ButtonPresss_Func (bool testConds, bool runActions) { int i=EventDialogControl(); if (i==gSelectionDialogButtons[0]){ gSelectionCurrentItem=0; UpdateMainDescription(0); UpdateStatsBars(0); UpdateUpgradeTabs(0); }else if(i==gSelectionDialogButtons[1]){ gSelectionCurrentItem=1; UpdateMainDescription(1); UpdateStatsBars(1); UpdateUpgradeTabs(1); }else if(i==gSelectionDialogButtons[2]){ gSelectionCurrentItem=2; UpdateMainDescription(2); UpdateStatsBars(2); UpdateUpgradeTabs(2); }else if(i==gSelectionDialogButtons[3]){ gSelectionCurrentItem=3; UpdateMainDescription(3); UpdateStatsBars(3); UpdateUpgradeTabs(3); //}else if(i==gSelectionDialogButtons[4]){ // gSelectionCurrentItem=4; // UpdateMainDescription(4); // UpdateStatsBars(4); // UpdateUpgradeTabs(4); //}else if(i==gSelectionDialogButtons[5]){ // gSelectionCurrentItem=5; // UpdateMainDescription(5); // UpdateStatsBars(5); // UpdateUpgradeTabs(5); }else if(i==gStatsButtonsAdd[0]){ IncreaseStatBy1(0); }else if(i==gStatsButtonsAdd[1]){ IncreaseStatBy1(1); }else if(i==gStatsButtonsAdd[2]){ IncreaseStatBy1(2); }else if(i==gStatsButtonsAdd[3]){ IncreaseStatBy1(3); }else if(i==gUpgradeTabButtons[0]){ BuyUpgrade(0); }else if(i==gUpgradeTabButtons[1]){ BuyUpgrade(1); }else if(i==gUpgradeTabButtons[2]){ BuyUpgrade(2); }else if(i==gUpgradeTabButtons[3]){ BuyUpgrade(3); }else if(i==gUpgradeTabButtons[4]){ BuyUpgrade(4); }else if(i==gUpgradeTabButtons[5]){ BuyUpgrade(5); } UpdateAllBuyButtons(); return true; } //-------------------------------------------------------------------------------------------------- void gt_ButtonPresss_Init () { gt_ButtonPress = TriggerCreate("gt_ButtonPresss_Func"); TriggerAddEventDialogControl(gt_ButtonPress, c_playerAny, c_invalidDialogControlId, c_triggerControlEventTypeClick); } bool dd(){ return true; } //-------------------------------------------------------------------------------------------------- void gt_ButtonPress_Init () { gt_ButtonPress = TriggerCreate("gt_ButtonPress_Func"); TriggerAddEventDialogControl(gt_ButtonPress, c_playerAny, c_invalidDialogControlId, c_triggerControlEventTypeClick); } //-------------------------------------------------------------------------------------------------- // Trigger: Initialization //-------------------------------------------------------------------------------------------------- bool gt_Initialization_Func (bool testConds, bool runActions) { // Actions if (!runActions) { return true; } libNtve_gf_HideGameUI(false, PlayerGroupAll()); gt_ButtonPresss_Init (); InitiateMenuScreen (); return true; } //-------------------------------------------------------------------------------------------------- void gt_Initialization_Init () { gt_Initialization = TriggerCreate("gt_Initialization_Func"); TriggerAddEventTimeElapsed(gt_Initialization, 0.1, c_timeGame); } //-------------------------------------------------------------------------------------------------- // Trigger Initialization //-------------------------------------------------------------------------------------------------- void InitTriggers () { gt_GLOBALSSTRUCTS_Init(); gt_BASICFUNCTIONS_Init(); gt_MeleeInitialization_Init(); gt_Mainfunctions_Init(); gt_WEAPONFUNCTIONS_Init(); gt_ButtonPress_Init(); gt_Initialization_Init(); } //-------------------------------------------------------------------------------------------------- // Map Initialization //-------------------------------------------------------------------------------------------------- void InitMap () { InitLibs(); InitTriggers(); }