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();}
That's a really weird bug... I don't even know what's causing it and I've never experienced it.
I hope you solve it so you may use the engine in your map :)
It seems the global function (not named in your case) has a parameter and a heap of local variables that are not named, hence they all are named lp_ and lv_ respectively (in the generated code).
To fix it go about and search for the function in the trigger window (it should be a defined "action" or function similar to a trigger).
EDIT:
Oh I found it, it's the function called 'Traceline', and it's defined as an "action". You should name the parameter and all local variables, as well as the function itself.
Yeah it's probably some editor bug. I still haven't fixed the camera issue yet though, but am still trying.
EDIT: Found the bug. I didn't think it was related to the issue but I tried having the UI hidden, and it worked! I tested with disabling the action in your map as well, which enables the UI, and the camera problem arises.
So apparently showing the default game UI (or parts of it) will mess with your camera.
Oh, I did not mean that the names came back, I was talking about something else..whoops. No, I had to re-name all the triggers and variables, and then it can save with no errs. But Like I said, the center of my camera is always the player, so thus the target will always be the player. (Please correct me if Im wrong.)
@LordFelco: Go
Sorry...And I didn't realize that was your problem, I knew about the renaming thing..lol sorry.
I believe that the easiest fix for this issue is to systematically go through each trigger, and rename every parameter, variable, and trigger with simple IDs, such a A1, A2, A3, etc.
I'm experiencing a new problem. When the TPS system is integrated into my map, you can only attack units if the are directly in front of you. Is this the same glitch you are experiencing, zelarules?
No. (At least, I dont think so..) I havent really tried it yet, but I took a look at it and it appears that it shoots at the center of your screen. Im my game, my hero is always the focus of the camera, so its always aiming at him. In this, the camera is more of an over-the-shoulder kind of thing.
Rollback Post to RevisionRollBack
Feel free to Send me a PM if you have any questions/concerns!
I've now updated the original post with the latest version of the engine, and I also attached the engine as a library, which should make it a lot easier to implement it into any map :)
@zeldarules28:
You can change the height of the camera by adding a camera trigger to change the camera object property.
Haven't read since this so maybe it has gotten a answer, but I'm pretty sure the no variable, no trigger names is from protecting your map. Did you ever do that?
My appologies, I did as it instructed, but forgot to show dependencies. Also, in order to increase performance, would hiding non- visible doodads help in any way?
Additionally, I am still unable to attack units. Where can height values be found, as the height in the data editor did not match what you entered into your trigger, therefore I assume that it's from another source? Do I need to enter any other values besides height in order for the attack function to work?
Are you sure you set the custom value 0 of every unit to the height of the unit? This need to be manually done for the traceline to know the height of the unit, since there's no way to otherwise get that information (that I know of).
I will edit the original post and make a guide for how to implement the library into a map.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
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"
Mind posting whatever solution you gave him? Id like to know also.
@LordFelco: Go
My mouse wheel accepts your apology, even tho u were so mean to it. =]
edit- is this of any use if your hero guy is the center of the view? That is how mine works. =[
@zeldarules28: Go
It wasn't a solution. Unrelated.
@zeldarules28:
That's a really weird bug... I don't even know what's causing it and I've never experienced it.
I hope you solve it so you may use the engine in your map :)
It works for me fine, I just have my ghost as the center of my camera at all times. so its always the target of the shot (I think. not sure totally)
@zeldarules28:
Oh, it works now? With the trigger names and all? Did you have to rename them?
@LordFelco: Go
It seems the global function (not named in your case) has a parameter and a heap of local variables that are not named, hence they all are named lp_ and lv_ respectively (in the generated code).
To fix it go about and search for the function in the trigger window (it should be a defined "action" or function similar to a trigger).
EDIT: Oh I found it, it's the function called 'Traceline', and it's defined as an "action". You should name the parameter and all local variables, as well as the function itself.
Action name: Traceline
Parameter name: Player
Here are the names of the local variables:
@Krakarn:
Really weird... they're all named in my file :S
@martinolsson: Go
Yeah it's probably some editor bug. I still haven't fixed the camera issue yet though, but am still trying.
EDIT: Found the bug. I didn't think it was related to the issue but I tried having the UI hidden, and it worked! I tested with disabling the action in your map as well, which enables the UI, and the camera problem arises. So apparently showing the default game UI (or parts of it) will mess with your camera.
@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.
Oh, I did not mean that the names came back, I was talking about something else..whoops. No, I had to re-name all the triggers and variables, and then it can save with no errs. But Like I said, the center of my camera is always the player, so thus the target will always be the player. (Please correct me if Im wrong.)
@LordFelco: Go Sorry...And I didn't realize that was your problem, I knew about the renaming thing..lol sorry.
I believe that the easiest fix for this issue is to systematically go through each trigger, and rename every parameter, variable, and trigger with simple IDs, such a A1, A2, A3, etc.
I'm experiencing a new problem. When the TPS system is integrated into my map, you can only attack units if the are directly in front of you. Is this the same glitch you are experiencing, zelarules?
No. (At least, I dont think so..) I havent really tried it yet, but I took a look at it and it appears that it shoots at the center of your screen. Im my game, my hero is always the focus of the camera, so its always aiming at him. In this, the camera is more of an over-the-shoulder kind of thing.
I've now updated the original post with the latest version of the engine, and I also attached the engine as a library, which should make it a lot easier to implement it into any map :)
@zeldarules28:
You can change the height of the camera by adding a camera trigger to change the camera object property.
@martinolsson: Go
Haven't read since this so maybe it has gotten a answer, but I'm pretty sure the no variable, no trigger names is from protecting your map. Did you ever do that?
@martinolsson: Go How does one implement a library into their map? Custom Script?
@Aspernation: Go
Read the original post :)
My appologies, I did as it instructed, but forgot to show dependencies. Also, in order to increase performance, would hiding non- visible doodads help in any way?
Additionally, I am still unable to attack units. Where can height values be found, as the height in the data editor did not match what you entered into your trigger, therefore I assume that it's from another source? Do I need to enter any other values besides height in order for the attack function to work?
@Aspernation:
Are you sure you set the custom value 0 of every unit to the height of the unit? This need to be manually done for the traceline to know the height of the unit, since there's no way to otherwise get that information (that I know of).
I will edit the original post and make a guide for how to implement the library into a map.