An AI doesn't know what to do unless you tell it what to do.
You could, for example, write this trigger:
Events
Unit - Any Unit is attacked
Local Variables
Conditions
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Owner of (Triggering unit)) == (Your ally player # here)
(Unit type of (Triggering unit)) == Ghost
Then
Unit - Order (Triggering unit) to (Ghost - Cloak (Ghost)) (Before Existing Orders)
Else
This trigger would make your ally Ghost cloak when he is attacked.
I played this map last night with a good friend of mine, and it sure was fun.
Overview:
You start with a single-chokepoint fortress you share with your ally, and 10 AI opponents have bases around every edge of the map (except south, where you are). Every player (and AI) has several nodes of high yield minerals, with 100000 minerals in each. Vespene Geysers are also plentiful in the same way.
My Experience:
We were both Terran, and we focused on getting tanks first on our high ground, followed by turrets to protect them from air units spotting them. Then we set up a line of turrets around each wall of our base. A lot of turrets, trust me. Though it's not like we were low on resources ;). The enemies were set to Easy difficulty, for obvious reasons. But you can change the difficulty, of course.
The first enemy attack was nearly all at once. Our siege tanks decimated them all, in a quite satisfactory display of siege mode. Once we had tanks, turrets, and SCVs on auto repair at the choke point, we were near invincible, and set out mass-producing nukes and ghosts to finish off the enemy. Slowly but surely, we nuked (and sometimes Yamato'd) every enemy to death. Victory was gained when every enemy had no more units of any type.
Problems with the map:
It was quite obviously one of the first maps made by the author, which was shown by sloppy terrain work surrounding the enemy bases. Mountains intersected the bases as natural barriers, but the author forgot to remove ground pathing on the mountains, or even smooth them a little. The result was your units being able to mountain-climb like champs up strange mountains with jagged spikes in some places, and huge pitfalls in others.
Enemies never expanded past their original base, despite several natural expansions being available for them.
Early defense against the 10 AIs is (in my opinion) impossible if you are playing Zerg, and damn hard if you are Protoss.
As for the releasing of these officially in the editor... My bet is on the Protoss expansion. We saw a lot of old returning Terran units in single player, which were available in the editor. Zerg has a few, like scourge and the lurker, but I bet we'll see defilers too when HotS releases. Protoss also have Scouts in the editor, and I bet we'll see reavers, dark archons, corsairs, and arbiters when that expansion comes out.
Bridges in this editor aren't handled in the same way it was in SC1. I don't know a proper way to fix it, but you can try putting terrain underneath the bridge...
I was just laying in bed moments ago, pondering how the hell one of us here nerds could solve the laggy, laggy problem of the key press event.
Am I correct in saying that pressing hotkeys for spells and abilities does not cause the same lag? If so...
Isn't there a way to make abilities run triggers? We could set up spells on the command card for moving in certain directions, with hotkeys of W, A, S, D. Each button would run the trigger that is otherwise activated by the key pressing event.
Keep in mind that I probably don't know what the hell I'm talking about, as last night was an awesome party.
I named every function, trigger, variable, etc. Now I have a syntax error on line 106. I'm not sure what you guys need to figure this out, so I'm posting the whole map script... I apologize to your scroll wheels.
Just CTRL-F this post for "LINE 106"
//==================================================================================================// // Generated Map Script// // Name: // Author: // //==================================================================================================include"TriggerLibs/NativeLib"//--------------------------------------------------------------------------------------------------// Library Initialization//--------------------------------------------------------------------------------------------------voidInitLibs(){libNtve_InitLib();}//--------------------------------------------------------------------------------------------------// Global Variables//--------------------------------------------------------------------------------------------------unit[3]gv_unit1;bool[3]gv_boolean1;bool[3]gv_boolean2;bool[3]gv_boolean3;bool[3]gv_boolean4;fixedgv_real1;bool[3]gv_boolean5;intgv_integer1;int[3]gv_integer2;bool[3]gv_boolean6;bool[3]gv_boolean7;bool[3]gv_boolean8;unit[3]gv_unit2;point[3]gv_point1;voidInitGlobals(){intinit_i;init_i=0;while(init_i<=2){gv_unit1[init_i]=null;init_i=init_i+1;}init_i=0;while(init_i<=2){gv_boolean1[init_i]=false;init_i=init_i+1;}init_i=0;while(init_i<=2){gv_boolean2[init_i]=false;init_i=init_i+1;}init_i=0;while(init_i<=2){gv_boolean3[init_i]=false;init_i=init_i+1;}init_i=0;while(init_i<=2){gv_boolean4[init_i]=false;init_i=init_i+1;}gv_real1=0.8;init_i=0;while(init_i<=2){gv_boolean5[init_i]=false;init_i=init_i+1;}gv_integer1=12;init_i=0;while(init_i<=2){gv_integer2[init_i]=gv_integer1;init_i=init_i+1;}init_i=0;while(init_i<=2){gv_boolean6[init_i]=false;init_i=init_i+1;}init_i=0;while(init_i<=2){gv_boolean7[init_i]=false;init_i=init_i+1;}init_i=0;while(init_i<=2){gv_boolean8[init_i]=false;init_i=init_i+1;}init_i=0;while(init_i<=2){gv_unit2[init_i]=null;init_i=init_i+1;}init_i=0;while(init_i<=2){gv_point1[init_i]=null;init_i=init_i+1;}}//--------------------------------------------------------------------------------------------------// Global Function Declarations//--------------------------------------------------------------------------------------------------voidgf_function(intlp_);// LINE 106//--------------------------------------------------------------------------------------------------// Trigger Variables//--------------------------------------------------------------------------------------------------triggergt_init;triggergt_heightvalues;triggergt_victorywhenhostilehasnone;triggergt_defeatedwhendeath;triggergt_camerarotate;triggergt_fire;triggergt_rof;triggergt_reload;triggergt_manualreload;triggergt_zoom;triggergt_zoomout;triggergt_Wdown;triggergt_Wup;triggergt_Adown;triggergt_Aup;triggergt_Sdown;triggergt_Sup;triggergt_Ddown;triggergt_Dup;triggergt_WASD;triggergt_flashlight;//--------------------------------------------------------------------------------------------------// Global Functions//--------------------------------------------------------------------------------------------------voidgf_function(intlp_){fixedauto60E39A1C_as;fixedauto60E39A1C_ae;fixedauto60E39A1C_ai;// Variable Declarationsintlv_;fixedlv_;fixedlv_;fixedlv_;fixedlv_;fixedlv_;pointlv_;regionlv_;fixedlv_;unitlv_;fixedlv_;// Variable Initializationlv_=100;lv_=CameraGetYaw(lp_);lv_=CameraGetPitch(lp_);lv_=(WorldHeight(c_heightMapGround,UnitGetPosition(gv_unit1[lp_]))+CameraInfoGetValue(CameraInfoDefault(),c_cameraValueHeightOffset));lv_=0.0;lv_=0.0;lv_=null;lv_=null;lv_=0.0;lv_=null;lv_=0.0;// Implementationauto60E39A1C_as=0.0;auto60E39A1C_ae=IntToFixed(lv_);auto60E39A1C_ai=0.1;lv_=auto60E39A1C_as;if(auto60E39A1C_ai>0||(auto60E39A1C_ai==0&&auto60E39A1C_as<auto60E39A1C_ae)){while(lv_<=auto60E39A1C_ae){if((lv_<90.0)){lv_=(Tan(lv_)*(lv_*-1.0));}else{if((lv_>270.0)){lv_=(Tan((360.0-lv_))*lv_);}else{}}lv_=PointWithOffsetPolar(UnitGetPosition(gv_unit1[lp_]),lv_,lv_);lv_=RegionCircle(lv_,0.3);lv_=WorldHeight(c_heightMapGround,lv_);lv_=libNtve_gf_ClosestUnitToPoint(lv_,UnitGroup(null,15,lv_,UnitFilter(0,0,0,0),0));lv_=WorldHeight(c_heightMapGround,UnitGetPosition(lv_));gv_unit2[lp_]=null;gv_point1[lp_]=null;if(((lv_!=null)&&(AbsF((lv_+(lv_-lv_)))>=0.0)&&(AbsF((lv_+(lv_-lv_)))<=UnitGetCustomValue(lv_,0)))){gv_unit2[lp_]=lv_;return;}else{if((AbsF((lv_+lv_))<=WorldHeight(c_heightMapGround,lv_))){gv_point1[lp_]=lv_;return;}else{}}lv_=lv_+auto60E39A1C_ai;}}elseif(auto60E39A1C_ai<0||(auto60E39A1C_ai==0&&auto60E39A1C_ae<auto60E39A1C_as)){while(lv_>=auto60E39A1C_ae){if((lv_<90.0)){lv_=(Tan(lv_)*(lv_*-1.0));}else{if((lv_>270.0)){lv_=(Tan((360.0-lv_))*lv_);}else{}}lv_=PointWithOffsetPolar(UnitGetPosition(gv_unit1[lp_]),lv_,lv_);lv_=RegionCircle(lv_,0.3);lv_=WorldHeight(c_heightMapGround,lv_);lv_=libNtve_gf_ClosestUnitToPoint(lv_,UnitGroup(null,15,lv_,UnitFilter(0,0,0,0),0));lv_=WorldHeight(c_heightMapGround,UnitGetPosition(lv_));gv_unit2[lp_]=null;gv_point1[lp_]=null;if(((lv_!=null)&&(AbsF((lv_+(lv_-lv_)))>=0.0)&&(AbsF((lv_+(lv_-lv_)))<=UnitGetCustomValue(lv_,0)))){gv_unit2[lp_]=lv_;return;}else{if((AbsF((lv_+lv_))<=WorldHeight(c_heightMapGround,lv_))){gv_point1[lp_]=lv_;return;}else{}}lv_=lv_+auto60E39A1C_ai;}}}//--------------------------------------------------------------------------------------------------// Trigger: init//--------------------------------------------------------------------------------------------------boolgt_init_Func(booltestConds,boolrunActions){// Actionsif(!runActions){returntrue;}GameSetSpeedValue(c_gameSpeedNormal);TriggerExecute(gt_heightvalues,false,false);gv_unit1[1]=UnitFromId(4);gv_unit1[2]=UnitFromId(401);libNtve_gf_SetPlayerGroupAlliance(PlayerGroupActive(),1);if((PlayerStatus(1)!=c_playerStatusActive)){UnitRemove(gv_unit1[1]);}else{}if((PlayerStatus(2)!=c_playerStatusActive)){UnitRemove(gv_unit1[2]);}else{}PlayerGroupLoopBegin(PlayerGroupActive());while(!PlayerGroupLoopDone()){VisRevealerCreate(PlayerGroupLoopCurrent(),RegionPlayableMap());PlayerGroupLoopStep();}PlayerGroupLoopEnd();UIDisplayMessage(PlayerGroupAll(),c_messageAreaSubtitle,StringExternal("Param/Value/9EC610A6"));PlayerGroupLoopBegin(PlayerGroupActive());while(!PlayerGroupLoopDone()){CameraForceMouseRelative(PlayerGroupLoopCurrent(),true);CameraSetMouseRotates(PlayerGroupLoopCurrent(),true);CameraUseHeightDisplacement(PlayerGroupLoopCurrent(),false);CameraUseHeightSmoothing(PlayerGroupLoopCurrent(),false);CameraPan(PlayerGroupLoopCurrent(),UnitGetPosition(gv_unit1[PlayerGroupLoopCurrent()]),0.0,-1,0,false);CameraFollowUnitGroup(PlayerGroupLoopCurrent(),libNtve_gf_ConvertUnitToUnitGroup(gv_unit1[PlayerGroupLoopCurrent()]),true,false);CameraSetValue(PlayerGroupLoopCurrent(),c_cameraValueYaw,UnitGetFacing(gv_unit1[PlayerGroupLoopCurrent()]),0.0,-1,10);CameraSetValue(PlayerGroupLoopCurrent(),c_cameraValueDistance,4.0,0.0,-1,0);CameraSetValue(PlayerGroupLoopCurrent(),c_cameraValuePitch,0.0,0.0,-1,0);CameraSetValue(PlayerGroupLoopCurrent(),c_cameraValueHeightOffset,1.1,0.0,-1,0);libNtve_gf_HideGameUI(false,PlayerGroupAll());libNtve_gf_DisplayBossBar(PlayerGroupLoopCurrent(),"Assets\\Textures\\icon-health-protoss.dds",StringExternal("Param/Value/60D72290"),100,PlayerGroupSingle(PlayerGroupLoopCurrent()));libNtve_gf_SetBossBarBoss(PlayerGroupLoopCurrent(),gv_unit1[PlayerGroupLoopCurrent()],true);libNtve_gf_SetBossBarRace(PlayerGroupLoopCurrent(),0,true);libNtve_gf_MoveBossBar(PlayerGroupLoopCurrent(),c_anchorTopLeft,20,20);libNtve_gf_DisplayBossBar((PlayerGroupLoopCurrent()+2),"Assets\\Textures\\icon-gas.dds",StringExternal("Param/Value/86E28E3A"),100,PlayerGroupSingle(PlayerGroupLoopCurrent()));libNtve_gf_SetBossBarMaximumValue((PlayerGroupLoopCurrent()+2),gv_integer1,true);libNtve_gf_SetBossBarCurrentValue((PlayerGroupLoopCurrent()+2),gv_integer2[PlayerGroupLoopCurrent()],true);libNtve_gf_SetBossBarRace((PlayerGroupLoopCurrent()+2),0,true);libNtve_gf_MoveBossBar((PlayerGroupLoopCurrent()+2),c_anchorTopRight,20,20);libNtve_gf_DisplayScreenImage(1,"Assets\\Textures\\btn-border-protoss-normal.dds",c_triggerBlendModeAdd,32,32,c_anchorCenter,0,0);PlayerGroupLoopStep();}PlayerGroupLoopEnd();returntrue;}//--------------------------------------------------------------------------------------------------voidgt_init_Init(){gt_init=TriggerCreate("gt_init_Func");TriggerAddEventMapInit(gt_init);}//--------------------------------------------------------------------------------------------------// Trigger: height values//--------------------------------------------------------------------------------------------------boolgt_heightvalues_Func(booltestConds,boolrunActions){// Actionsif(!runActions){returntrue;}UnitGroupLoopBegin(UnitGroupAlliance(1,c_unitAllianceEnemy,RegionEntireMap(),UnitFilter(0,0,(1<<c_targetFilterMissile),(1<<(c_targetFilterDead-32))|(1<<(c_targetFilterHidden-32))),0));while(!UnitGroupLoopDone()){if((UnitGetType(UnitGroupLoopCurrent())=="Zergling")){UnitSetCustomValue(UnitGroupLoopCurrent(),0,0.5);}else{if((UnitGetType(UnitGroupLoopCurrent())=="Baneling")){UnitSetCustomValue(UnitGroupLoopCurrent(),0,0.7);}else{if((UnitGetType(UnitGroupLoopCurrent())=="Hydralisk")){UnitSetCustomValue(UnitGroupLoopCurrent(),0,1.5);}else{if((UnitGetType(UnitGroupLoopCurrent())=="Ultralisk")){UnitSetCustomValue(UnitGroupLoopCurrent(),0,6.2);}else{}}}}UnitGroupLoopStep();}UnitGroupLoopEnd();returntrue;}//--------------------------------------------------------------------------------------------------voidgt_heightvalues_Init(){gt_heightvalues=TriggerCreate("gt_heightvalues_Func");TriggerEnable(gt_heightvalues,false);}//--------------------------------------------------------------------------------------------------// Trigger: victory when hostile has none//--------------------------------------------------------------------------------------------------boolgt_victorywhenhostilehasnone_Func(booltestConds,boolrunActions){// Conditionsif(testConds){if(!(((UnitGetOwner(EventUnit())==15)&&(UnitGroupCount(UnitGroupAlliance(c_playerAny,c_unitAllianceEnemy,RegionEntireMap(),UnitFilter(0,0,(1<<c_targetFilterMissile),(1<<(c_targetFilterDead-32))|(1<<(c_targetFilterHidden-32))),0),c_unitCountAlive)==0)))){returnfalse;}}// Actionsif(!runActions){returntrue;}Wait(1.5,c_timeReal);PlayerGroupLoopBegin(PlayerGroupActive());while(!PlayerGroupLoopDone()){GameOver(PlayerGroupLoopCurrent(),c_gameOverVictory,true,false);PlayerGroupLoopStep();}PlayerGroupLoopEnd();returntrue;}//--------------------------------------------------------------------------------------------------voidgt_victorywhenhostilehasnone_Init(){gt_victorywhenhostilehasnone=TriggerCreate("gt_victorywhenhostilehasnone_Func");TriggerAddEventUnitDied(gt_victorywhenhostilehasnone,null);}//--------------------------------------------------------------------------------------------------// Trigger: defeated when death//--------------------------------------------------------------------------------------------------boolgt_defeatedwhendeath_Func(booltestConds,boolrunActions){// Conditionsif(testConds){if(!((EventPlayer()!=15))){returnfalse;}}// Actionsif(!runActions){returntrue;}Wait(3.0,c_timeReal);PlayerGroupLoopBegin(PlayerGroupActive());while(!PlayerGroupLoopDone()){GameOver(PlayerGroupLoopCurrent(),c_gameOverDefeat,true,false);PlayerGroupLoopStep();}PlayerGroupLoopEnd();returntrue;}//--------------------------------------------------------------------------------------------------voidgt_defeatedwhendeath_Init(){gt_defeatedwhendeath=TriggerCreate("gt_defeatedwhendeath_Func");TriggerAddEventUnitDied(gt_defeatedwhendeath,UnitRefFromVariable("gv_unit1[1]"));TriggerAddEventUnitDied(gt_defeatedwhendeath,UnitRefFromVariable("gv_unit1[2]"));}//--------------------------------------------------------------------------------------------------// Trigger: camera rotate//--------------------------------------------------------------------------------------------------boolgt_camerarotate_Func(booltestConds,boolrunActions){// Actionsif(!runActions){returntrue;}PlayerGroupLoopBegin(PlayerGroupActive());while(!PlayerGroupLoopDone()){UnitSetFacing(gv_unit1[PlayerGroupLoopCurrent()],CameraGetYaw(PlayerGroupLoopCurrent()),0.2);PlayerGroupLoopStep();}PlayerGroupLoopEnd();returntrue;}//--------------------------------------------------------------------------------------------------voidgt_camerarotate_Init(){gt_camerarotate=TriggerCreate("gt_camerarotate_Func");TriggerAddEventTimePeriodic(gt_camerarotate,0.1,c_timeGame);}//--------------------------------------------------------------------------------------------------// Trigger: fire//--------------------------------------------------------------------------------------------------boolgt_fire_Func(booltestConds,boolrunActions){// Conditionsif(testConds){if(!(((UnitIsAlive(gv_unit1[EventPlayer()])==true)&&(gv_boolean5[EventPlayer()]==false)&&(gv_integer2[EventPlayer()]>0)&&(gv_boolean1[EventPlayer()]==false)&&(gv_boolean2[EventPlayer()]==false)&&(gv_boolean3[EventPlayer()]==false)&&(gv_boolean4[EventPlayer()]==false)))){returnfalse;}}// Actionsif(!runActions){returntrue;}gv_boolean5[EventPlayer()]=true;TriggerExecute(gt_rof,false,false);gv_integer2[EventPlayer()]=gv_integer2[EventPlayer()]-1;libNtve_gf_SetBossBarCurrentValue((EventPlayer()+2),gv_integer2[EventPlayer()],true);if((gv_integer2[EventPlayer()]==0)){gv_boolean6[EventPlayer()]=true;TriggerExecute(gt_reload,false,false);}else{}libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(gv_unit1[EventPlayer()]),c_animNameDefault,"Attack",0,c_animTimeDefault);gf_function(EventPlayer());if((gv_unit2[EventPlayer()]!=null)){UnitCreateEffectUnit(gv_unit1[EventPlayer()],"C10CanisterRifle",gv_unit2[EventPlayer()]);UnitIssueOrder(gv_unit2[EventPlayer()],OrderTargetingUnit(AbilityCommand("attack",0),gv_unit1[EventPlayer()]),c_orderQueueReplace);}else{if((gv_point1[EventPlayer()]!=null)){UnitCreateEffectPoint(gv_unit1[EventPlayer()],"C10CanisterRifle",gv_point1[EventPlayer()]);}else{SoundPlay(SoundLink("Ghost_AttackLaunch",-1),PlayerGroupAll(),100.0,0.0);}}returntrue;}//--------------------------------------------------------------------------------------------------voidgt_fire_Init(){gt_fire=TriggerCreate("gt_fire_Func");TriggerAddEventMouseClicked(gt_fire,1,c_mouseButtonLeft,true);TriggerAddEventMouseClicked(gt_fire,2,c_mouseButtonLeft,true);}//--------------------------------------------------------------------------------------------------// Trigger: rof//--------------------------------------------------------------------------------------------------boolgt_rof_Func(booltestConds,boolrunActions){// Actionsif(!runActions){returntrue;}Wait(AbsF(gv_real1),c_timeReal);gv_boolean5[EventPlayer()]=false;returntrue;}//--------------------------------------------------------------------------------------------------voidgt_rof_Init(){gt_rof=TriggerCreate("gt_rof_Func");TriggerEnable(gt_rof,false);}//--------------------------------------------------------------------------------------------------// Trigger: reload//--------------------------------------------------------------------------------------------------boolgt_reload_Func(booltestConds,boolrunActions){// Actionsif(!runActions){returntrue;}Wait(3.0,c_timeReal);gv_integer2[EventPlayer()]=gv_integer1;libNtve_gf_SetBossBarCurrentValue((EventPlayer()+2),gv_integer2[EventPlayer()],true);returntrue;}//--------------------------------------------------------------------------------------------------voidgt_reload_Init(){gt_reload=TriggerCreate("gt_reload_Func");TriggerEnable(gt_reload,false);}//--------------------------------------------------------------------------------------------------// Trigger: manual reload//--------------------------------------------------------------------------------------------------boolgt_manualreload_Func(booltestConds,boolrunActions){// Conditionsif(testConds){if(!(((UnitIsAlive(gv_unit1[EventPlayer()])==true)&&(gv_integer2[EventPlayer()]>0)&&(gv_integer2[EventPlayer()]<gv_integer1)))){returnfalse;}}// Actionsif(!runActions){returntrue;}gv_integer2[EventPlayer()]=0;libNtve_gf_SetBossBarCurrentValue((EventPlayer()+2),gv_integer2[EventPlayer()],true);TriggerExecute(gt_reload,false,false);returntrue;}//--------------------------------------------------------------------------------------------------voidgt_manualreload_Init(){gt_manualreload=TriggerCreate("gt_manualreload_Func");TriggerAddEventKeyPressed(gt_manualreload,1,c_keyR,true,c_keyModifierStateIgnore,c_keyModifierStateIgnore,c_keyModifierStateIgnore);TriggerAddEventKeyPressed(gt_manualreload,2,c_keyR,true,c_keyModifierStateIgnore,c_keyModifierStateIgnore,c_keyModifierStateIgnore);}//--------------------------------------------------------------------------------------------------// Trigger: zoom//--------------------------------------------------------------------------------------------------boolgt_zoom_Func(booltestConds,boolrunActions){// Conditionsif(testConds){if(!(((gv_boolean1[EventPlayer()]==false)&&(gv_boolean2[EventPlayer()]==false)&&(gv_boolean3[EventPlayer()]==false)&&(gv_boolean4[EventPlayer()]==false)))){returnfalse;}}// Actionsif(!runActions){returntrue;}gv_boolean7[EventPlayer()]=true;CameraSetValue(EventPlayer(),c_cameraValueDistance,1.0,0.3,-1,10);returntrue;}//--------------------------------------------------------------------------------------------------voidgt_zoom_Init(){gt_zoom=TriggerCreate("gt_zoom_Func");TriggerAddEventMouseClicked(gt_zoom,1,c_mouseButtonRight,true);TriggerAddEventMouseClicked(gt_zoom,2,c_mouseButtonRight,true);}//--------------------------------------------------------------------------------------------------// Trigger: zoom out//--------------------------------------------------------------------------------------------------boolgt_zoomout_Func(booltestConds,boolrunActions){// Conditionsif(testConds){if(!((gv_boolean7[EventPlayer()]==true))){returnfalse;}}// Actionsif(!runActions){returntrue;}gv_boolean7[EventPlayer()]=false;CameraSetValue(EventPlayer(),c_cameraValueDistance,4.0,0.55,-1,10);returntrue;}//--------------------------------------------------------------------------------------------------voidgt_zoomout_Init(){gt_zoomout=TriggerCreate("gt_zoomout_Func");TriggerAddEventMouseClicked(gt_zoomout,1,c_mouseButtonRight,false);TriggerAddEventMouseClicked(gt_zoomout,2,c_mouseButtonRight,false);}//--------------------------------------------------------------------------------------------------// Trigger: W down//--------------------------------------------------------------------------------------------------boolgt_Wdown_Func(booltestConds,boolrunActions){// Actionsif(!runActions){returntrue;}gv_boolean1[EventPlayer()]=true;libNtve_gf_ClearAnimation(libNtve_gf_MainActorofUnit(gv_unit1[EventPlayer()]),c_animNameDefault);TriggerExecute(gt_zoomout,true,false);returntrue;}//--------------------------------------------------------------------------------------------------voidgt_Wdown_Init(){gt_Wdown=TriggerCreate("gt_Wdown_Func");TriggerAddEventKeyPressed(gt_Wdown,1,c_keyW,true,c_keyModifierStateIgnore,c_keyModifierStateIgnore,c_keyModifierStateIgnore);TriggerAddEventKeyPressed(gt_Wdown,2,c_keyW,true,c_keyModifierStateIgnore,c_keyModifierStateIgnore,c_keyModifierStateIgnore);}//--------------------------------------------------------------------------------------------------// Trigger: W up//--------------------------------------------------------------------------------------------------boolgt_Wup_Func(booltestConds,boolrunActions){// Actionsif(!runActions){returntrue;}gv_boolean1[EventPlayer()]=false;returntrue;}//--------------------------------------------------------------------------------------------------voidgt_Wup_Init(){gt_Wup=TriggerCreate("gt_Wup_Func");TriggerAddEventKeyPressed(gt_Wup,1,c_keyW,false,c_keyModifierStateIgnore,c_keyModifierStateIgnore,c_keyModifierStateIgnore);TriggerAddEventKeyPressed(gt_Wup,2,c_keyW,false,c_keyModifierStateIgnore,c_keyModifierStateIgnore,c_keyModifierStateIgnore);}//--------------------------------------------------------------------------------------------------// Trigger: A down//--------------------------------------------------------------------------------------------------boolgt_Adown_Func(booltestConds,boolrunActions){// Actionsif(!runActions){returntrue;}gv_boolean2[EventPlayer()]=true;libNtve_gf_ClearAnimation(libNtve_gf_MainActorofUnit(gv_unit1[EventPlayer()]),c_animNameDefault);TriggerExecute(gt_zoomout,true,false);returntrue;}//--------------------------------------------------------------------------------------------------voidgt_Adown_Init(){gt_Adown=TriggerCreate("gt_Adown_Func");TriggerAddEventKeyPressed(gt_Adown,1,c_keyA,true,c_keyModifierStateIgnore,c_keyModifierStateIgnore,c_keyModifierStateIgnore);TriggerAddEventKeyPressed(gt_Adown,2,c_keyA,true,c_keyModifierStateIgnore,c_keyModifierStateIgnore,c_keyModifierStateIgnore);}//--------------------------------------------------------------------------------------------------// Trigger: A up//--------------------------------------------------------------------------------------------------boolgt_Aup_Func(booltestConds,boolrunActions){// Actionsif(!runActions){returntrue;}gv_boolean2[EventPlayer()]=false;returntrue;}//--------------------------------------------------------------------------------------------------voidgt_Aup_Init(){gt_Aup=TriggerCreate("gt_Aup_Func");TriggerAddEventKeyPressed(gt_Aup,1,c_keyA,false,c_keyModifierStateIgnore,c_keyModifierStateIgnore,c_keyModifierStateIgnore);TriggerAddEventKeyPressed(gt_Aup,2,c_keyA,false,c_keyModifierStateIgnore,c_keyModifierStateIgnore,c_keyModifierStateIgnore);}//--------------------------------------------------------------------------------------------------// Trigger: S down//--------------------------------------------------------------------------------------------------boolgt_Sdown_Func(booltestConds,boolrunActions){// Actionsif(!runActions){returntrue;}gv_boolean3[EventPlayer()]=true;libNtve_gf_ClearAnimation(libNtve_gf_MainActorofUnit(gv_unit1[EventPlayer()]),c_animNameDefault);TriggerExecute(gt_zoomout,true,false);returntrue;}//--------------------------------------------------------------------------------------------------voidgt_Sdown_Init(){gt_Sdown=TriggerCreate("gt_Sdown_Func");TriggerAddEventKeyPressed(gt_Sdown,1,c_keyS,true,c_keyModifierStateIgnore,c_keyModifierStateIgnore,c_keyModifierStateIgnore);TriggerAddEventKeyPressed(gt_Sdown,2,c_keyS,true,c_keyModifierStateIgnore,c_keyModifierStateIgnore,c_keyModifierStateIgnore);}//--------------------------------------------------------------------------------------------------// Trigger: S up//--------------------------------------------------------------------------------------------------boolgt_Sup_Func(booltestConds,boolrunActions){// Actionsif(!runActions){returntrue;}gv_boolean3[EventPlayer()]=false;returntrue;}//--------------------------------------------------------------------------------------------------voidgt_Sup_Init(){gt_Sup=TriggerCreate("gt_Sup_Func");TriggerAddEventKeyPressed(gt_Sup,1,c_keyS,false,c_keyModifierStateIgnore,c_keyModifierStateIgnore,c_keyModifierStateIgnore);TriggerAddEventKeyPressed(gt_Sup,2,c_keyS,false,c_keyModifierStateIgnore,c_keyModifierStateIgnore,c_keyModifierStateIgnore);}//--------------------------------------------------------------------------------------------------// Trigger: D down//--------------------------------------------------------------------------------------------------boolgt_Ddown_Func(booltestConds,boolrunActions){// Actionsif(!runActions){returntrue;}gv_boolean4[EventPlayer()]=true;libNtve_gf_ClearAnimation(libNtve_gf_MainActorofUnit(gv_unit1[EventPlayer()]),c_animNameDefault);TriggerExecute(gt_zoomout,true,false);returntrue;}//--------------------------------------------------------------------------------------------------voidgt_Ddown_Init(){gt_Ddown=TriggerCreate("gt_Ddown_Func");TriggerAddEventKeyPressed(gt_Ddown,1,c_keyD,true,c_keyModifierStateIgnore,c_keyModifierStateIgnore,c_keyModifierStateIgnore);TriggerAddEventKeyPressed(gt_Ddown,2,c_keyD,true,c_keyModifierStateIgnore,c_keyModifierStateIgnore,c_keyModifierStateIgnore);}//--------------------------------------------------------------------------------------------------// Trigger: D up//--------------------------------------------------------------------------------------------------boolgt_Dup_Func(booltestConds,boolrunActions){// Actionsif(!runActions){returntrue;}gv_boolean4[EventPlayer()]=false;returntrue;}//--------------------------------------------------------------------------------------------------voidgt_Dup_Init(){gt_Dup=TriggerCreate("gt_Dup_Func");TriggerAddEventKeyPressed(gt_Dup,1,c_keyD,false,c_keyModifierStateIgnore,c_keyModifierStateIgnore,c_keyModifierStateIgnore);TriggerAddEventKeyPressed(gt_Dup,2,c_keyD,false,c_keyModifierStateIgnore,c_keyModifierStateIgnore,c_keyModifierStateIgnore);}//--------------------------------------------------------------------------------------------------// Trigger: WASD//--------------------------------------------------------------------------------------------------boolgt_WASD_Func(booltestConds,boolrunActions){// Variable Declarationsintlv_;// Variable Initializationlv_=0;// Actionsif(!runActions){returntrue;}PlayerGroupLoopBegin(PlayerGroupActive());while(!PlayerGroupLoopDone()){lv_=PlayerGroupLoopCurrent();if(((gv_boolean1[lv_]==true)&&(gv_boolean2[lv_]==false)&&(gv_boolean3[lv_]==false)&&(gv_boolean4[lv_]==false))){UnitIssueOrder(gv_unit1[lv_],OrderTargetingPoint(AbilityCommand("move",0),PointWithOffsetPolar(UnitGetPosition(gv_unit1[lv_]),0.5,CameraGetYaw(lv_))),c_orderQueueReplace);}else{}if(((gv_boolean1[lv_]==false)&&(gv_boolean2[lv_]==true)&&(gv_boolean3[lv_]==false)&&(gv_boolean4[lv_]==false))){UnitIssueOrder(gv_unit1[lv_],OrderTargetingPoint(AbilityCommand("move",0),PointWithOffsetPolar(UnitGetPosition(gv_unit1[lv_]),0.5,(CameraGetYaw(lv_)+90.0))),c_orderQueueReplace);}else{}if(((gv_boolean1[lv_]==false)&&(gv_boolean2[lv_]==false)&&(gv_boolean3[lv_]==true)&&(gv_boolean4[lv_]==false))){UnitIssueOrder(gv_unit1[lv_],OrderTargetingPoint(AbilityCommand("move",0),PointWithOffsetPolar(UnitGetPosition(gv_unit1[lv_]),0.5,(CameraGetYaw(lv_)+180.0))),c_orderQueueReplace);}else{}if(((gv_boolean1[lv_]==false)&&(gv_boolean2[lv_]==false)&&(gv_boolean3[lv_]==false)&&(gv_boolean4[lv_]==true))){UnitIssueOrder(gv_unit1[lv_],OrderTargetingPoint(AbilityCommand("move",0),PointWithOffsetPolar(UnitGetPosition(gv_unit1[lv_]),0.5,(CameraGetYaw(lv_)+-90.0))),c_orderQueueReplace);}else{}if(((gv_boolean1[lv_]==true)&&(gv_boolean2[lv_]==true)&&(gv_boolean3[lv_]==false)&&(gv_boolean4[lv_]==false))){UnitIssueOrder(gv_unit1[lv_],OrderTargetingPoint(AbilityCommand("move",0),PointWithOffsetPolar(UnitGetPosition(gv_unit1[lv_]),0.5,(CameraGetYaw(lv_)+45.0))),c_orderQueueReplace);}else{}if(((gv_boolean1[lv_]==true)&&(gv_boolean2[lv_]==false)&&(gv_boolean3[lv_]==false)&&(gv_boolean4[lv_]==true))){UnitIssueOrder(gv_unit1[lv_],OrderTargetingPoint(AbilityCommand("move",0),PointWithOffsetPolar(UnitGetPosition(gv_unit1[lv_]),0.5,(CameraGetYaw(lv_)+-45.0))),c_orderQueueReplace);}else{}if(((gv_boolean1[lv_]==false)&&(gv_boolean2[lv_]==true)&&(gv_boolean3[lv_]==true)&&(gv_boolean4[lv_]==false))){UnitIssueOrder(gv_unit1[lv_],OrderTargetingPoint(AbilityCommand("move",0),PointWithOffsetPolar(UnitGetPosition(gv_unit1[lv_]),0.5,(CameraGetYaw(lv_)+135.0))),c_orderQueueReplace);}else{}if(((gv_boolean1[lv_]==false)&&(gv_boolean2[lv_]==false)&&(gv_boolean3[lv_]==true)&&(gv_boolean4[lv_]==true))){UnitIssueOrder(gv_unit1[lv_],OrderTargetingPoint(AbilityCommand("move",0),PointWithOffsetPolar(UnitGetPosition(gv_unit1[lv_]),0.5,(CameraGetYaw(lv_)+-135.0))),c_orderQueueReplace);}else{}PlayerGroupLoopStep();}PlayerGroupLoopEnd();returntrue;}//--------------------------------------------------------------------------------------------------voidgt_WASD_Init(){gt_WASD=TriggerCreate("gt_WASD_Func");TriggerAddEventTimePeriodic(gt_WASD,0.04,c_timeGame);}//--------------------------------------------------------------------------------------------------// Trigger: flashlight//--------------------------------------------------------------------------------------------------boolgt_flashlight_Func(booltestConds,boolrunActions){// Variable Declarationsintlv_;// Variable Initializationlv_=EventPlayer();// Actionsif(!runActions){returntrue;}if((gv_boolean8[lv_]==false)){gv_boolean8[lv_]=true;UnitBehaviorAddPlayer(gv_unit1[lv_],"Flashlight",lv_,1);}else{gv_boolean8[lv_]=false;UnitBehaviorRemovePlayer(gv_unit1[lv_],"Flashlight",lv_,1);}returntrue;}//--------------------------------------------------------------------------------------------------voidgt_flashlight_Init(){gt_flashlight=TriggerCreate("gt_flashlight_Func");TriggerAddEventKeyPressed(gt_flashlight,1,c_keyF,true,c_keyModifierStateIgnore,c_keyModifierStateIgnore,c_keyModifierStateIgnore);TriggerAddEventKeyPressed(gt_flashlight,2,c_keyF,true,c_keyModifierStateIgnore,c_keyModifierStateIgnore,c_keyModifierStateIgnore);}//--------------------------------------------------------------------------------------------------// Trigger Initialization//--------------------------------------------------------------------------------------------------voidInitTriggers(){gt_init_Init();gt_heightvalues_Init();gt_victorywhenhostilehasnone_Init();gt_defeatedwhendeath_Init();gt_camerarotate_Init();gt_fire_Init();gt_rof_Init();gt_reload_Init();gt_manualreload_Init();gt_zoom_Init();gt_zoomout_Init();gt_Wdown_Init();gt_Wup_Init();gt_Adown_Init();gt_Aup_Init();gt_Sdown_Init();gt_Sup_Init();gt_Ddown_Init();gt_Dup_Init();gt_WASD_Init();gt_flashlight_Init();}//--------------------------------------------------------------------------------------------------// Map Initialization//--------------------------------------------------------------------------------------------------voidInitMap(){InitLibs();InitGlobals();InitTriggers();}
I was saddened to discover today the map "Parasite" on BNET
While I in no way insinuate that it steals from me (development was likely started before my own map), it has many of the same concepts of my map, except better. I hereby discontinue development of the Changeling, in favor of new ideas.
There is no way I can top what Parasite has accomplished.
Your Action is set to just add a football to the SCV. It never specifies to remove the football from where it got picked up. The trigger isn't that smart to distinguish that on its own. You have to tell it that with another Action. I'm no pro, so I won't know what that action you need to add is... But someone here will know, and will help, I'm sure.
0
An AI doesn't know what to do unless you tell it what to do.
You could, for example, write this trigger:
Events
Unit - Any Unit is attacked
Local Variables
Conditions
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Owner of (Triggering unit)) == (Your ally player # here)
(Unit type of (Triggering unit)) == Ghost
Then
Unit - Order (Triggering unit) to (Ghost - Cloak (Ghost)) (Before Existing Orders)
Else
This trigger would make your ally Ghost cloak when he is attacked.
0
I played this map last night with a good friend of mine, and it sure was fun.
Overview:
You start with a single-chokepoint fortress you share with your ally, and 10 AI opponents have bases around every edge of the map (except south, where you are). Every player (and AI) has several nodes of high yield minerals, with 100000 minerals in each. Vespene Geysers are also plentiful in the same way.
My Experience:
We were both Terran, and we focused on getting tanks first on our high ground, followed by turrets to protect them from air units spotting them. Then we set up a line of turrets around each wall of our base. A lot of turrets, trust me. Though it's not like we were low on resources ;). The enemies were set to Easy difficulty, for obvious reasons. But you can change the difficulty, of course.
The first enemy attack was nearly all at once. Our siege tanks decimated them all, in a quite satisfactory display of siege mode. Once we had tanks, turrets, and SCVs on auto repair at the choke point, we were near invincible, and set out mass-producing nukes and ghosts to finish off the enemy. Slowly but surely, we nuked (and sometimes Yamato'd) every enemy to death. Victory was gained when every enemy had no more units of any type.
Problems with the map:
It was quite obviously one of the first maps made by the author, which was shown by sloppy terrain work surrounding the enemy bases. Mountains intersected the bases as natural barriers, but the author forgot to remove ground pathing on the mountains, or even smooth them a little. The result was your units being able to mountain-climb like champs up strange mountains with jagged spikes in some places, and huge pitfalls in others.
Enemies never expanded past their original base, despite several natural expansions being available for them.
Early defense against the 10 AIs is (in my opinion) impossible if you are playing Zerg, and damn hard if you are Protoss.
My Rating:
I give this map two zerglings out of five
0
I too have played this map, and noticed some bugs... I want to get in contact with the author. Hope I can find an e-mail or something...
0
As for the releasing of these officially in the editor... My bet is on the Protoss expansion. We saw a lot of old returning Terran units in single player, which were available in the editor. Zerg has a few, like scourge and the lurker, but I bet we'll see defilers too when HotS releases. Protoss also have Scouts in the editor, and I bet we'll see reavers, dark archons, corsairs, and arbiters when that expansion comes out.
0
Bridges in this editor aren't handled in the same way it was in SC1. I don't know a proper way to fix it, but you can try putting terrain underneath the bridge...
0
I was just laying in bed moments ago, pondering how the hell one of us here nerds could solve the laggy, laggy problem of the key press event.
Am I correct in saying that pressing hotkeys for spells and abilities does not cause the same lag? If so...
Isn't there a way to make abilities run triggers? We could set up spells on the command card for moving in certain directions, with hotkeys of W, A, S, D. Each button would run the trigger that is otherwise activated by the key pressing event.
Keep in mind that I probably don't know what the hell I'm talking about, as last night was an awesome party.
0
@Krakarn: Go
Thank you very much. Your idea worked, and it applied to other problems when I fixed the traceline action.
I went through all triggers and renamed every local variable.
0
@zeldarules28: Go
It wasn't a solution. Unrelated.
0
Theoretically, it is possible to create everything but #4.
The question if someone is going to spend months working on it? I'm not sure.
0
I named every function, trigger, variable, etc. Now I have a syntax error on line 106. I'm not sure what you guys need to figure this out, so I'm posting the whole map script... I apologize to your scroll wheels.
Just CTRL-F this post for "LINE 106"
0
@Eithos:
I tried editing other things, like adding in a small trigger edit to allow it to shoot Marines and other units. Syntax error on line 21.
0
I was saddened to discover today the map "Parasite" on BNET
While I in no way insinuate that it steals from me (development was likely started before my own map), it has many of the same concepts of my map, except better. I hereby discontinue development of the Changeling, in favor of new ideas.
There is no way I can top what Parasite has accomplished.
0
@Ice_bane:
I'm afraid it's not... theres no Owner Name flag, so I doubt anything like that would work.
Perhaps something in the text editor...
0
9-hour bump. Hopefully someone knows how to help.
0
@Aussie123: Go
I can see where you are confused.
Your Action is set to just add a football to the SCV. It never specifies to remove the football from where it got picked up. The trigger isn't that smart to distinguish that on its own. You have to tell it that with another Action. I'm no pro, so I won't know what that action you need to add is... But someone here will know, and will help, I'm sure.