• 0

    posted a message on NPC player not using abilities

    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.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Two Vs The WORLD

    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

    http://images3.wikia.nocookie.net/__cb20100317022956/starcraft/images/6/69/Zergling_SC1_Game1.gifhttp://images3.wikia.nocookie.net/__cb20100317022956/starcraft/images/6/69/Zergling_SC1_Game1.gif

    Posted in: Map Review
  • 0

    posted a message on Have question - Kerrigans Voice?

    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...

    Posted in: Miscellaneous Development
  • 0

    posted a message on [Request] Reaver

    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.

    Posted in: Requests
  • 0

    posted a message on Couple Questions

    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...

    Posted in: Miscellaneous Development
  • 0

    posted a message on Lagless TPS Solution?

    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.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Third Person Shooter (TPS) engine - Download if you need one

    @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.

    Posted in: Triggers
  • 0

    posted a message on Third Person Shooter (TPS) engine - Download if you need one

    @zeldarules28: Go

    It wasn't a solution. Unrelated.

    Posted in: Triggers
  • 0

    posted a message on Is the Galaxy editor mighty enough ??

    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.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Third Person Shooter (TPS) engine - Download if you need one

    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
    //--------------------------------------------------------------------------------------------------
    void InitLibs () {
        libNtve_InitLib();
    }
    
    //--------------------------------------------------------------------------------------------------
    // Global Variables
    //--------------------------------------------------------------------------------------------------
    unit[3] gv_unit1;
    bool[3] gv_boolean1;
    bool[3] gv_boolean2;
    bool[3] gv_boolean3;
    bool[3] gv_boolean4;
    fixed gv_real1;
    bool[3] gv_boolean5;
    int gv_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;
    
    void InitGlobals () {
        int init_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
    //--------------------------------------------------------------------------------------------------
    void gf_function (int lp_); // LINE 106
    
    //--------------------------------------------------------------------------------------------------
    // Trigger Variables
    //--------------------------------------------------------------------------------------------------
    trigger gt_init;
    trigger gt_heightvalues;
    trigger gt_victorywhenhostilehasnone;
    trigger gt_defeatedwhendeath;
    trigger gt_camerarotate;
    trigger gt_fire;
    trigger gt_rof;
    trigger gt_reload;
    trigger gt_manualreload;
    trigger gt_zoom;
    trigger gt_zoomout;
    trigger gt_Wdown;
    trigger gt_Wup;
    trigger gt_Adown;
    trigger gt_Aup;
    trigger gt_Sdown;
    trigger gt_Sup;
    trigger gt_Ddown;
    trigger gt_Dup;
    trigger gt_WASD;
    trigger gt_flashlight;
    
    //--------------------------------------------------------------------------------------------------
    // Global Functions
    //--------------------------------------------------------------------------------------------------
    void gf_function (int lp_) {
        fixed auto60E39A1C_as;
        fixed auto60E39A1C_ae;
        fixed auto60E39A1C_ai;
    
        // Variable Declarations
        int lv_;
        fixed lv_;
        fixed lv_;
        fixed lv_;
        fixed lv_;
    
        fixed lv_;
        point lv_;
        region lv_;
        fixed lv_;
        unit lv_;
        fixed lv_;
    
        // Variable Initialization
        lv_ = 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;
    
        // Implementation
        auto60E39A1C_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;
            }
        }
        else if (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
    //--------------------------------------------------------------------------------------------------
    bool gt_init_Func (bool testConds, bool runActions) {
        // Actions
        if (!runActions) {
            return true;
        }
    
        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();
        return true;
    }
    
    //--------------------------------------------------------------------------------------------------
    void gt_init_Init () {
        gt_init = TriggerCreate("gt_init_Func");
        TriggerAddEventMapInit(gt_init);
    }
    
    //--------------------------------------------------------------------------------------------------
    // Trigger: height values
    //--------------------------------------------------------------------------------------------------
    bool gt_heightvalues_Func (bool testConds, bool runActions) {
        // Actions
        if (!runActions) {
            return true;
        }
    
        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();
        return true;
    }
    
    //--------------------------------------------------------------------------------------------------
    void gt_heightvalues_Init () {
        gt_heightvalues = TriggerCreate("gt_heightvalues_Func");
        TriggerEnable(gt_heightvalues, false);
    }
    
    //--------------------------------------------------------------------------------------------------
    // Trigger: victory when hostile has none
    //--------------------------------------------------------------------------------------------------
    bool gt_victorywhenhostilehasnone_Func (bool testConds, bool runActions) {
        // Conditions
        if (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)))) {
                return false;
            }
        }
    
        // Actions
        if (!runActions) {
            return true;
        }
    
        Wait(1.5, c_timeReal);
        PlayerGroupLoopBegin(PlayerGroupActive());
        while (!PlayerGroupLoopDone()) {
            GameOver(PlayerGroupLoopCurrent(), c_gameOverVictory, true, false);
            PlayerGroupLoopStep();
        }
        PlayerGroupLoopEnd();
        return true;
    }
    
    //--------------------------------------------------------------------------------------------------
    void gt_victorywhenhostilehasnone_Init () {
        gt_victorywhenhostilehasnone = TriggerCreate("gt_victorywhenhostilehasnone_Func");
        TriggerAddEventUnitDied(gt_victorywhenhostilehasnone, null);
    }
    
    //--------------------------------------------------------------------------------------------------
    // Trigger: defeated when death
    //--------------------------------------------------------------------------------------------------
    bool gt_defeatedwhendeath_Func (bool testConds, bool runActions) {
        // Conditions
        if (testConds) {
            if (!((EventPlayer() != 15))) {
                return false;
            }
        }
    
        // Actions
        if (!runActions) {
            return true;
        }
    
        Wait(3.0, c_timeReal);
        PlayerGroupLoopBegin(PlayerGroupActive());
        while (!PlayerGroupLoopDone()) {
            GameOver(PlayerGroupLoopCurrent(), c_gameOverDefeat, true, false);
            PlayerGroupLoopStep();
        }
        PlayerGroupLoopEnd();
        return true;
    }
    
    //--------------------------------------------------------------------------------------------------
    void gt_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
    //--------------------------------------------------------------------------------------------------
    bool gt_camerarotate_Func (bool testConds, bool runActions) {
        // Actions
        if (!runActions) {
            return true;
        }
    
        PlayerGroupLoopBegin(PlayerGroupActive());
        while (!PlayerGroupLoopDone()) {
            UnitSetFacing(gv_unit1[PlayerGroupLoopCurrent()], CameraGetYaw(PlayerGroupLoopCurrent()), 0.2);
            PlayerGroupLoopStep();
        }
        PlayerGroupLoopEnd();
        return true;
    }
    
    //--------------------------------------------------------------------------------------------------
    void gt_camerarotate_Init () {
        gt_camerarotate = TriggerCreate("gt_camerarotate_Func");
        TriggerAddEventTimePeriodic(gt_camerarotate, 0.1, c_timeGame);
    }
    
    //--------------------------------------------------------------------------------------------------
    // Trigger: fire
    //--------------------------------------------------------------------------------------------------
    bool gt_fire_Func (bool testConds, bool runActions) {
        // Conditions
        if (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)))) {
                return false;
            }
        }
    
        // Actions
        if (!runActions) {
            return true;
        }
    
        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);
            }
        }
        return true;
    }
    
    //--------------------------------------------------------------------------------------------------
    void gt_fire_Init () {
        gt_fire = TriggerCreate("gt_fire_Func");
        TriggerAddEventMouseClicked(gt_fire, 1, c_mouseButtonLeft, true);
        TriggerAddEventMouseClicked(gt_fire, 2, c_mouseButtonLeft, true);
    }
    
    //--------------------------------------------------------------------------------------------------
    // Trigger: rof
    //--------------------------------------------------------------------------------------------------
    bool gt_rof_Func (bool testConds, bool runActions) {
        // Actions
        if (!runActions) {
            return true;
        }
    
        Wait(AbsF(gv_real1), c_timeReal);
        gv_boolean5[EventPlayer()] = false;
        return true;
    }
    
    //--------------------------------------------------------------------------------------------------
    void gt_rof_Init () {
        gt_rof = TriggerCreate("gt_rof_Func");
        TriggerEnable(gt_rof, false);
    }
    
    //--------------------------------------------------------------------------------------------------
    // Trigger: reload
    //--------------------------------------------------------------------------------------------------
    bool gt_reload_Func (bool testConds, bool runActions) {
        // Actions
        if (!runActions) {
            return true;
        }
    
        Wait(3.0, c_timeReal);
        gv_integer2[EventPlayer()] = gv_integer1;
        libNtve_gf_SetBossBarCurrentValue((EventPlayer() + 2), gv_integer2[EventPlayer()], true);
        return true;
    }
    
    //--------------------------------------------------------------------------------------------------
    void gt_reload_Init () {
        gt_reload = TriggerCreate("gt_reload_Func");
        TriggerEnable(gt_reload, false);
    }
    
    //--------------------------------------------------------------------------------------------------
    // Trigger: manual reload
    //--------------------------------------------------------------------------------------------------
    bool gt_manualreload_Func (bool testConds, bool runActions) {
        // Conditions
        if (testConds) {
            if (!(((UnitIsAlive(gv_unit1[EventPlayer()]) == true) && (gv_integer2[EventPlayer()] > 0) && (gv_integer2[EventPlayer()] < gv_integer1)))) {
                return false;
            }
        }
    
        // Actions
        if (!runActions) {
            return true;
        }
    
        gv_integer2[EventPlayer()] = 0;
        libNtve_gf_SetBossBarCurrentValue((EventPlayer() + 2), gv_integer2[EventPlayer()], true);
        TriggerExecute(gt_reload, false, false);
        return true;
    }
    
    //--------------------------------------------------------------------------------------------------
    void gt_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
    //--------------------------------------------------------------------------------------------------
    bool gt_zoom_Func (bool testConds, bool runActions) {
        // Conditions
        if (testConds) {
            if (!(((gv_boolean1[EventPlayer()] == false) && (gv_boolean2[EventPlayer()] == false) && (gv_boolean3[EventPlayer()] == false) && (gv_boolean4[EventPlayer()] == false)))) {
                return false;
            }
        }
    
        // Actions
        if (!runActions) {
            return true;
        }
    
        gv_boolean7[EventPlayer()] = true;
        CameraSetValue(EventPlayer(), c_cameraValueDistance, 1.0, 0.3, -1, 10);
        return true;
    }
    
    //--------------------------------------------------------------------------------------------------
    void gt_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
    //--------------------------------------------------------------------------------------------------
    bool gt_zoomout_Func (bool testConds, bool runActions) {
        // Conditions
        if (testConds) {
            if (!((gv_boolean7[EventPlayer()] == true))) {
                return false;
            }
        }
    
        // Actions
        if (!runActions) {
            return true;
        }
    
        gv_boolean7[EventPlayer()] = false;
        CameraSetValue(EventPlayer(), c_cameraValueDistance, 4.0, 0.55, -1, 10);
        return true;
    }
    
    //--------------------------------------------------------------------------------------------------
    void gt_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
    //--------------------------------------------------------------------------------------------------
    bool gt_Wdown_Func (bool testConds, bool runActions) {
        // Actions
        if (!runActions) {
            return true;
        }
    
        gv_boolean1[EventPlayer()] = true;
        libNtve_gf_ClearAnimation(libNtve_gf_MainActorofUnit(gv_unit1[EventPlayer()]), c_animNameDefault);
        TriggerExecute(gt_zoomout, true, false);
        return true;
    }
    
    //--------------------------------------------------------------------------------------------------
    void gt_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
    //--------------------------------------------------------------------------------------------------
    bool gt_Wup_Func (bool testConds, bool runActions) {
        // Actions
        if (!runActions) {
            return true;
        }
    
        gv_boolean1[EventPlayer()] = false;
        return true;
    }
    
    //--------------------------------------------------------------------------------------------------
    void gt_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
    //--------------------------------------------------------------------------------------------------
    bool gt_Adown_Func (bool testConds, bool runActions) {
        // Actions
        if (!runActions) {
            return true;
        }
    
        gv_boolean2[EventPlayer()] = true;
        libNtve_gf_ClearAnimation(libNtve_gf_MainActorofUnit(gv_unit1[EventPlayer()]), c_animNameDefault);
        TriggerExecute(gt_zoomout, true, false);
        return true;
    }
    
    //--------------------------------------------------------------------------------------------------
    void gt_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
    //--------------------------------------------------------------------------------------------------
    bool gt_Aup_Func (bool testConds, bool runActions) {
        // Actions
        if (!runActions) {
            return true;
        }
    
        gv_boolean2[EventPlayer()] = false;
        return true;
    }
    
    //--------------------------------------------------------------------------------------------------
    void gt_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
    //--------------------------------------------------------------------------------------------------
    bool gt_Sdown_Func (bool testConds, bool runActions) {
        // Actions
        if (!runActions) {
            return true;
        }
    
        gv_boolean3[EventPlayer()] = true;
        libNtve_gf_ClearAnimation(libNtve_gf_MainActorofUnit(gv_unit1[EventPlayer()]), c_animNameDefault);
        TriggerExecute(gt_zoomout, true, false);
        return true;
    }
    
    //--------------------------------------------------------------------------------------------------
    void gt_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
    //--------------------------------------------------------------------------------------------------
    bool gt_Sup_Func (bool testConds, bool runActions) {
        // Actions
        if (!runActions) {
            return true;
        }
    
        gv_boolean3[EventPlayer()] = false;
        return true;
    }
    
    //--------------------------------------------------------------------------------------------------
    void gt_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
    //--------------------------------------------------------------------------------------------------
    bool gt_Ddown_Func (bool testConds, bool runActions) {
        // Actions
        if (!runActions) {
            return true;
        }
    
        gv_boolean4[EventPlayer()] = true;
        libNtve_gf_ClearAnimation(libNtve_gf_MainActorofUnit(gv_unit1[EventPlayer()]), c_animNameDefault);
        TriggerExecute(gt_zoomout, true, false);
        return true;
    }
    
    //--------------------------------------------------------------------------------------------------
    void gt_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
    //--------------------------------------------------------------------------------------------------
    bool gt_Dup_Func (bool testConds, bool runActions) {
        // Actions
        if (!runActions) {
            return true;
        }
    
        gv_boolean4[EventPlayer()] = false;
        return true;
    }
    
    //--------------------------------------------------------------------------------------------------
    void gt_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
    //--------------------------------------------------------------------------------------------------
    bool gt_WASD_Func (bool testConds, bool runActions) {
        // Variable Declarations
        int lv_;
    
        // Variable Initialization
        lv_ = 0;
    
        // Actions
        if (!runActions) {
            return true;
        }
    
        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();
        return true;
    }
    
    //--------------------------------------------------------------------------------------------------
    void gt_WASD_Init () {
        gt_WASD = TriggerCreate("gt_WASD_Func");
        TriggerAddEventTimePeriodic(gt_WASD, 0.04, c_timeGame);
    }
    
    //--------------------------------------------------------------------------------------------------
    // Trigger: flashlight
    //--------------------------------------------------------------------------------------------------
    bool gt_flashlight_Func (bool testConds, bool runActions) {
        // Variable Declarations
        int lv_;
    
        // Variable Initialization
        lv_ = EventPlayer();
    
        // Actions
        if (!runActions) {
            return true;
        }
    
        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);
        }
        return true;
    }
    
    //--------------------------------------------------------------------------------------------------
    void gt_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
    //--------------------------------------------------------------------------------------------------
    void InitTriggers () {
        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
    //--------------------------------------------------------------------------------------------------
    void InitMap () {
        InitLibs();
        InitGlobals();
        InitTriggers();
    }
    
    Posted in: Triggers
  • 0

    posted a message on Third Person Shooter (TPS) engine - Download if you need one

    @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.

    Posted in: Triggers
  • 0

    posted a message on The Changeling Development Discontinued

    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.

    Posted in: Miscellaneous Development
  • 0

    posted a message on [Data] Removing Player Name Over Unit

    @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...

    Posted in: Miscellaneous Development
  • 0

    posted a message on [Data] Removing Player Name Over Unit

    9-hour bump. Hopefully someone knows how to help.

    Posted in: Miscellaneous Development
  • 0

    posted a message on how to get SCV's to pickup a football?

    @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.

    Posted in: Miscellaneous Development
  • To post a comment, please or register a new account.