• 0

    posted a message on create units for a region to other region

    Hi, In condition of spwaner trigger, with event timer, is it possible to make if for only player1 action == true execute action or if for only player2 action == true execute other action.

    Now all players spawn units at the end of timer, but, if i want make for example p1 spwan = timer, p2 spawn = timer +25.0 ec.. for make one wave 2 player (p1 vs p4), second wave (p2 vs p5) and finally wave (p3 vs p6); after all reset all and restart p1 vs p4, p2 vs p5 and p3 vs p6.

    In timer event ivent the player activator, and i dont know how to refer to a single player for do it.

    Hope my very bad english it is comprensible, or i retry to explain

    Posted in: Galaxy Scripting
  • 0

    posted a message on create units for a region to other region

    oh, u are semple the best! if u are near me, now, i offer to you, lot of beers, thx very much again!

    Posted in: Galaxy Scripting
  • 0

    posted a message on create units for a region to other region

    yes, for make more long the way of arena i move spawn region out of camera limit. I search to dont make more big the map for dont make it heavy. Now have only 1player vs cpu, but after i will want make 3v3 players and the map must to be not heavy.

    Posted in: Galaxy Scripting
  • 0

    posted a message on create units for a region to other region

    i hope that my description of problem now it is more accurate:

    I try to explain:

    The last script make for example a Bmarine with route(plane i think it is more good word) 1x1 into a 1x1 area of player1. After the script, build a new units, by what it found on area 11 to 240, for example a Marine.

    The problem is that:

    when i make for example, a tank, a units that have trace 2x2, the script found one unit on lot of area :11,12,51,52 and dont work and make a error. If i try to resize units route of a units 2x2 to 1x1, the script work, but if i make units near, the script make error. I think becouse found 2 units in the same area.

    I hope to make problem more clear and comprehensible , if dont... i try again ^^

    I post the latest map with error when try to build a tank. In game: Select Ajatax builder, on menu press F, after build a tank, S shortcut

    P.s. Excuse me for bad english, my english it is unforgivable

    Posted in: Galaxy Scripting
  • 0

    posted a message on create units for a region to other region

    yeah, i have a new problem incoming.

    Now the project take soo big, and work very well.

    But i found problem when i try to position a unit more big than 1x1.

    for example a tank that have tile 2x2.

    Have u some idea about for resolve the problem?

    Ive think to make other area 2x2, but that hurt, lot of location areas on map, and ive to duplicate all script. I dont want make heavy all. Some idea?

    thx, bye bye

    Posted in: Galaxy Scripting
  • 0

    posted a message on create units for a region to other region

    thx very much. Thousand of THX, script work very well.

    Posted in: Galaxy Scripting
  • 0

    posted a message on create units for a region to other region

    fixing waves by timer like what u told me. spwan units at periodic time event. Put some Bmarine and after x time, marine spawn on arena like old fix but after periodic time, in some position of bmarine, but on arena . Just add a periodic time event, and array bidimensional like what u told me for give last fix work with a periodical timer event . If u can/want..

    best reguard

    Posted in: Galaxy Scripting
  • 0

    posted a message on create units for a region to other region

    NOTHING, my mind it is broke, can you help me for the last time? u can use the last map that i post here. Can u write me this? This is a last rock i think, for finish my project. Soo, THX very much if u can or if u cant, for all your help u give to me.

    Bye

    Posted in: Galaxy Scripting
  • 0

    posted a message on create units for a region to other region

    thx, i try it

    Posted in: Galaxy Scripting
  • 0

    posted a message on create units for a region to other region

    this script dont work if i make a timer for wave on condition. like:

    TriggerAddEventTimePeriodic(10,c_timeGame)

    becouse the script into variable enteringpoint use EventUnit() and also it dont storage all position but last position

    Posted in: Galaxy Scripting
  • 0

    posted a message on create units for a region to other region

    thx very much, it is what i want. Best reguard

    P.s. Sorry, second time i work with editor of sc2, and i use a buider scripting inside; i think i make some error that u correct.

    THX VERY MUCH AGAIN, U ROCK!

    Posted in: Galaxy Scripting
  • 0

    posted a message on create units for a region to other region

    bmarine it is a no attacker units. He is just what u build for waves 1Bmarie = 1marine on arena 1Bdevastator = 1 devastor on arena 34Bmarine = 34marine on arena in the same position of bmarine. Script of attak i think is not important, but if u need i post all code. More good, i post all project ^^ pls help me, im blocking Trigger: quanti Bmarine entrano 1 it is the triger of problem

    //==================================================================================================
    // 
    // Generated Map Script
    // 
    // Name:   The war of bau
    // 
    //==================================================================================================
    include "TriggerLibs/NativeLib"
    
    //--------------------------------------------------------------------------------------------------
    // Library Initialization
    //--------------------------------------------------------------------------------------------------
    void InitLibs () {
        libNtve_InitLib();
    }
    
    //--------------------------------------------------------------------------------------------------
    // Constants
    //--------------------------------------------------------------------------------------------------
    const fixed gv_tempodeltimer = 5.0;
    
    //--------------------------------------------------------------------------------------------------
    // Global Variables
    //--------------------------------------------------------------------------------------------------
    timer gv_timerondate;
    int gv_risorseVespene;
    int gv_risorseMinerali;
    region[241] gv_regionip1;
    int gv_numeroBmarinep1;
    int gv_numeromietitorep1;
    
    void InitGlobals () {
        int init_i;
    
        gv_timerondate = TimerCreate();
        gv_risorseVespene = 1;
        gv_risorseMinerali = 40;
        for (init_i = 0; init_i <= 240; init_i += 1) {
            gv_regionip1[init_i] = RegionFromId(init_i);
        }
    }
    
    //--------------------------------------------------------------------------------------------------
    // Trigger Variables
    //--------------------------------------------------------------------------------------------------
    trigger gt_assegnazioneunitC3A0agiocatori3x3;
    trigger gt_tempodelleondateviwer;
    trigger gt_timerrisorse;
    trigger gt_spostaleunitC3A0inarenasud;
    trigger gt_spostaleunitC3A0inarenanord;
    trigger gt_quantiBmarineentrano1;
    trigger gt_abilitC3A0marinestimpack;
    trigger gt_test;
    trigger gt_quantiBmietitorientrano1;
    trigger gt_spostamentobmietitore;
    
    //--------------------------------------------------------------------------------------------------
    // Trigger: assegnazione unit?? a giocatori 3x3
    //--------------------------------------------------------------------------------------------------
    bool gt_assegnazioneunitC3A0agiocatori3x3_Func (bool testConds, bool runActions) {
        // Actions
        if (!runActions) {
            return true;
        }
    
        if ((PlayerStatus(1) != c_playerStatusUnused)) {
            libNtve_gf_CreateUnitsWithDefaultFacing(1, "Ayatax", 0, 1, PointFromId(1));
        }
        else {
        }
        if ((PlayerStatus(2) != c_playerStatusUnused)) {
            libNtve_gf_CreateUnitsWithDefaultFacing(1, "Ayatax", 0, 2, PointFromId(4));
        }
        else {
        }
        if ((PlayerStatus(3) != c_playerStatusUnused)) {
            libNtve_gf_CreateUnitsWithDefaultFacing(1, "Ayatax", 0, 3, PointFromId(5));
        }
        else {
        }
        if ((PlayerStatus(4) != c_playerStatusUnused)) {
            libNtve_gf_CreateUnitsWithDefaultFacing(1, "Ayatax", 0, 4, PointFromId(93));
        }
        else {
        }
        if ((PlayerStatus(5) != c_playerStatusUnused)) {
            libNtve_gf_CreateUnitsWithDefaultFacing(1, "Ayatax", 0, 5, PointFromId(94));
        }
        else {
        }
        if ((PlayerStatus(6) != c_playerStatusUnused)) {
            libNtve_gf_CreateUnitsWithDefaultFacing(1, "Ayatax", 0, 6, PointFromId(95));
        }
        else {
        }
        return true;
    }
    
    //--------------------------------------------------------------------------------------------------
    void gt_assegnazioneunitC3A0agiocatori3x3_Init () {
        gt_assegnazioneunitC3A0agiocatori3x3 = TriggerCreate("gt_assegnazioneunitC3A0agiocatori3x3_Func");
        TriggerAddEventMapInit(gt_assegnazioneunitC3A0agiocatori3x3);
    }
    
    //--------------------------------------------------------------------------------------------------
    // Trigger: tempo delle ondate viwer
    //--------------------------------------------------------------------------------------------------
    bool gt_tempodelleondateviwer_Func (bool testConds, bool runActions) {
        // Actions
        if (!runActions) {
            return true;
        }
    
        TimerStart(gv_timerondate, gv_tempodeltimer, true, c_timeGame);
        TimerWindowCreate(gv_timerondate, StringExternal("Param/Value/94B3561A"), true, false);
        TimerWindowShow(TimerWindowLastCreated(), PlayerGroupAll(), true);
        return true;
    }
    
    //--------------------------------------------------------------------------------------------------
    void gt_tempodelleondateviwer_Init () {
        gt_tempodelleondateviwer = TriggerCreate("gt_tempodelleondateviwer_Func");
        TriggerAddEventMapInit(gt_tempodelleondateviwer);
    }
    
    //--------------------------------------------------------------------------------------------------
    // Trigger: timer risorse
    //--------------------------------------------------------------------------------------------------
    bool gt_timerrisorse_Func (bool testConds, bool runActions) {
        // Actions
        if (!runActions) {
            return true;
        }
    
        PlayerModifyPropertyInt(1, c_playerPropMinerals, c_playerPropOperAdd, gv_risorseMinerali);
        PlayerModifyPropertyInt(1, c_playerPropVespene, c_playerPropOperAdd, gv_risorseVespene);
        PlayerModifyPropertyInt(2, c_playerPropMinerals, c_playerPropOperAdd, gv_risorseMinerali);
        PlayerModifyPropertyInt(2, c_playerPropVespene, c_playerPropOperAdd, gv_risorseVespene);
        PlayerModifyPropertyInt(3, c_playerPropMinerals, c_playerPropOperAdd, gv_risorseMinerali);
        PlayerModifyPropertyInt(3, c_playerPropVespene, c_playerPropOperAdd, gv_risorseVespene);
        PlayerModifyPropertyInt(4, c_playerPropMinerals, c_playerPropOperAdd, gv_risorseMinerali);
        PlayerModifyPropertyInt(4, c_playerPropVespene, c_playerPropOperAdd, gv_risorseVespene);
        PlayerModifyPropertyInt(5, c_playerPropMinerals, c_playerPropOperAdd, gv_risorseMinerali);
        PlayerModifyPropertyInt(5, c_playerPropVespene, c_playerPropOperAdd, gv_risorseVespene);
        PlayerModifyPropertyInt(6, c_playerPropMinerals, c_playerPropOperAdd, gv_risorseMinerali);
        PlayerModifyPropertyInt(6, c_playerPropVespene, c_playerPropOperAdd, gv_risorseVespene);
        return true;
    }
    
    //--------------------------------------------------------------------------------------------------
    void gt_timerrisorse_Init () {
        gt_timerrisorse = TriggerCreate("gt_timerrisorse_Func");
        TriggerAddEventTimePeriodic(gt_timerrisorse, 2.0, c_timeGame);
    }
    
    //--------------------------------------------------------------------------------------------------
    // Trigger: sposta le unit?? in arena sud
    //--------------------------------------------------------------------------------------------------
    bool gt_spostaleunitC3A0inarenasud_Func (bool testConds, bool runActions) {
        // Conditions
        if (testConds) {
            if (!(((UnitGetOwner(EventUnit()) == 1) || (UnitGetOwner(EventUnit()) == 2) || (UnitGetOwner(EventUnit()) == 3)))) {
                return false;
            }
        }
    
        // Actions
        if (!runActions) {
            return true;
        }
    
        UnitIssueOrder(EventUnit(), OrderTargetingPoint(AbilityCommand("attack", 0), UnitGetPosition(UnitFromId(3))), c_orderQueueAddToEnd);
        return true;
    }
    
    //--------------------------------------------------------------------------------------------------
    void gt_spostaleunitC3A0inarenasud_Init () {
        gt_spostaleunitC3A0inarenasud = TriggerCreate("gt_spostaleunitC3A0inarenasud_Func");
        TriggerAddEventUnitRegion(gt_spostaleunitC3A0inarenasud, null, RegionFromId(1), true);
    }
    
    //--------------------------------------------------------------------------------------------------
    // Trigger: sposta le unit?? in arena nord
    //--------------------------------------------------------------------------------------------------
    bool gt_spostaleunitC3A0inarenanord_Func (bool testConds, bool runActions) {
        // Conditions
        if (testConds) {
            if (!(((UnitGetOwner(EventUnit()) == 4) || (UnitGetOwner(EventUnit()) == 5) || (UnitGetOwner(EventUnit()) == 6)))) {
                return false;
            }
        }
    
        // Actions
        if (!runActions) {
            return true;
        }
    
        UnitIssueOrder(EventUnit(), OrderTargetingPoint(AbilityCommand("attack", 0), UnitGetPosition(UnitFromId(2))), c_orderQueueAddToEnd);
        return true;
    }
    
    //--------------------------------------------------------------------------------------------------
    void gt_spostaleunitC3A0inarenanord_Init () {
        gt_spostaleunitC3A0inarenanord = TriggerCreate("gt_spostaleunitC3A0inarenanord_Func");
        TriggerAddEventUnitRegion(gt_spostaleunitC3A0inarenanord, null, RegionFromId(2), true);
    }
    
    //--------------------------------------------------------------------------------------------------
    // Trigger: quanti Bmarine entrano 1
    //--------------------------------------------------------------------------------------------------
    bool gt_quantiBmarineentrano1_Func (bool testConds, bool runActions) {
        int auto54E74DE6_ae;
        int auto54E74DE6_ai;
    
        // Variable Declarations
        int lv_cicloposizioni;
    
        // Variable Initialization
    
        // Conditions
        if (testConds) {
            if (!((UnitGetType(EventUnit()) == "Bmarine"))) {
                return false;
            }
        }
    
        // Actions
        if (!runActions) {
            return true;
        }
    
        auto54E74DE6_ae = 250;
        auto54E74DE6_ai = 1;
        lv_cicloposizioni = 10;
        for ( ; ( (auto54E74DE6_ai >= 0 && lv_cicloposizioni <= auto54E74DE6_ae) || (auto54E74DE6_ai <= 0 && lv_cicloposizioni >= auto54E74DE6_ae) ) ; lv_cicloposizioni += auto54E74DE6_ai ) {
            UIDisplayMessage(PlayerGroupAll(), c_messageAreaChat, IntToText(lv_cicloposizioni));
            if ((UnitGetType(RegionGetAttachUnit(RegionFromId(lv_cicloposizioni))) == null)) {
                UIDisplayMessage(PlayerGroupAll(), c_messageAreaDebug, StringExternal("Param/Value/5FB84FFB"));
                UIDisplayMessage(PlayerGroupAll(), c_messageAreaDebug, IntToText(lv_cicloposizioni));
                libNtve_gf_UnitCreateFacingPoint(1, "Marine", 0, 1, RegionGetCenter(RegionFromId(lv_cicloposizioni+1440)), UnitGetPosition(UnitFromId(3)));
                libNtve_gf_MakeUnitUncommandable(UnitLastCreated(), true);
            }
            else {
            }
        }
        return true;
    }
    
    //--------------------------------------------------------------------------------------------------
    void gt_quantiBmarineentrano1_Init () {
        gt_quantiBmarineentrano1 = TriggerCreate("gt_quantiBmarineentrano1_Func");
        TriggerAddEventUnitRegion(gt_quantiBmarineentrano1, UnitRefFromUnit(RegionGetAttachUnit(RegionFromId(3))), RegionFromId(3), true);
    }
    
    //--------------------------------------------------------------------------------------------------
    // Trigger: abilit?? marine stimpack
    //--------------------------------------------------------------------------------------------------
    bool gt_abilitC3A0marinestimpack_Func (bool testConds, bool runActions) {
        // Conditions
        if (testConds) {
            if (!((UnitGetType(EventUnit()) == "Marine"))) {
                return false;
            }
        }
    
        // Actions
        if (!runActions) {
            return true;
        }
    
        UnitIssueOrder(EventUnit(), Order(AbilityCommand("Stimpack", 0)), c_orderQueueReplace);
        return true;
    }
    
    //--------------------------------------------------------------------------------------------------
    void gt_abilitC3A0marinestimpack_Init () {
        gt_abilitC3A0marinestimpack = TriggerCreate("gt_abilitC3A0marinestimpack_Func");
        TriggerAddEventUnitStartedAttack2(gt_abilitC3A0marinestimpack, null, null);
    }
    
    //--------------------------------------------------------------------------------------------------
    // Trigger: test
    //--------------------------------------------------------------------------------------------------
    bool gt_test_Func (bool testConds, bool runActions) {
        // Actions
        if (!runActions) {
            return true;
        }
    
        libNtve_gf_CreateUnitsWithDefaultFacing(1, "Marine", 0, 4, RegionGetCenter(RegionFromId(2)));
        return true;
    }
    
    //--------------------------------------------------------------------------------------------------
    void gt_test_Init () {
        gt_test = TriggerCreate("gt_test_Func");
        TriggerAddEventTimePeriodic(gt_test, gv_tempodeltimer, c_timeGame);
    }
    
    //--------------------------------------------------------------------------------------------------
    // Trigger: quanti Bmietitori entrano 1
    //--------------------------------------------------------------------------------------------------
    bool gt_quantiBmietitorientrano1_Func (bool testConds, bool runActions) {
        // Conditions
        if (testConds) {
            if (!((UnitGetType(EventUnit()) == "Bmietitore"))) {
                return false;
            }
        }
    
        // Actions
        if (!runActions) {
            return true;
        }
    
        gv_numeromietitorep1 += 1;
        return true;
    }
    
    //--------------------------------------------------------------------------------------------------
    void gt_quantiBmietitorientrano1_Init () {
        gt_quantiBmietitorientrano1 = TriggerCreate("gt_quantiBmietitorientrano1_Func");
        TriggerAddEventUnitRegion(gt_quantiBmietitorientrano1, UnitRefFromUnit(UnitLastCreated()), RegionFromId(3), true);
    }
    
    //--------------------------------------------------------------------------------------------------
    // Trigger: spostamento bmietitore
    //--------------------------------------------------------------------------------------------------
    bool gt_spostamentobmietitore_Func (bool testConds, bool runActions) {
        // Conditions
        if (testConds) {
            if (!((gv_numeromietitorep1 != 0))) {
                return false;
            }
        }
    
        // Actions
        if (!runActions) {
            return true;
        }
    
        libNtve_gf_CreateUnitsWithDefaultFacing(gv_numeromietitorep1, "Reaper", 0, 1, RegionGetCenter(RegionFromId(1)));
        libNtve_gf_MakeUnitUncommandable(UnitLastCreated(), true);
        return true;
    }
    
    //--------------------------------------------------------------------------------------------------
    void gt_spostamentobmietitore_Init () {
        gt_spostamentobmietitore = TriggerCreate("gt_spostamentobmietitore_Func");
        TriggerAddEventTimePeriodic(gt_spostamentobmietitore, gv_tempodeltimer, c_timeGame);
    }
    
    //--------------------------------------------------------------------------------------------------
    // Trigger Initialization
    //--------------------------------------------------------------------------------------------------
    void InitTriggers () {
        gt_assegnazioneunitC3A0agiocatori3x3_Init();
        gt_tempodelleondateviwer_Init();
        gt_timerrisorse_Init();
        gt_spostaleunitC3A0inarenasud_Init();
        gt_spostaleunitC3A0inarenanord_Init();
        gt_quantiBmarineentrano1_Init();
        gt_abilitC3A0marinestimpack_Init();
        gt_test_Init();
        gt_quantiBmietitorientrano1_Init();
        gt_spostamentobmietitore_Init();
    }
    
    //--------------------------------------------------------------------------------------------------
    // Map Initialization
    //--------------------------------------------------------------------------------------------------
    void InitMap () {
        InitLibs();
        InitGlobals();
        InitTriggers();
    }
    

    if u need more info, tell me pls. thx

    Posted in: Galaxy Scripting
  • 0

    posted a message on create units for a region to other region

    no one can help me?

    Posted in: Galaxy Scripting
  • 0

    posted a message on create units for a region to other region

    hi, I build with my builder units, a BMARINE (custom marine) into region with ID 1, that have inside other ragions with id 11 to 240.

    From here its all is ok. I want when "X time go away", build into a ragion with id 11+1140 to 240+1140 a normal MARINE (not custom) into the same region of Bmarine but with ID+1140 I build a script but dont work. If i check into clicle that in region id 11to240 have a BMARINE, dont work. If i check into cicle that in region id11to240 have someone, script build me 240 marines units into region id1150 to 1380... yeah.. that is problem.. if i build 1-2 x... BMARINE, in X different region, its not important, the wrong scritp, dont left work, and dont build anythingh or build in all region assigned to build

    with:

    (UnitGetType(RegionGetAttachUnit(RegionFromId(lv_cicloposizioni))) == null)

    with:

    (UnitGetType(RegionGetAttachUnit(RegionFromId(lv_cicloposizioni))) != null)

    build nothing.

    Here the code:

    bool gt_quantiBmarineentrano1_Func (bool testConds, bool runActions) {
        int auto54E74DE6_ae;
        int auto54E74DE6_ai;
    
        // Variable Declarations
        int lv_cicloposizioni;
    
        // Variable Initialization
    
        // Conditions
        if (testConds) {
            if (!((UnitGetType(EventUnit()) == "Bmarine"))) {
                return false;
            }
        }
    
        // Actions
        if (!runActions) {
            return true;
        }
    
        auto54E74DE6_ae = 250;
        auto54E74DE6_ai = 1;
        lv_cicloposizioni = 10;
        for ( ; ( (auto54E74DE6_ai >= 0 && lv_cicloposizioni <= auto54E74DE6_ae) || (auto54E74DE6_ai <= 0 && lv_cicloposizioni >= auto54E74DE6_ae) ) ; lv_cicloposizioni += auto54E74DE6_ai ) {
            
            if ((UnitGetType(RegionGetAttachUnit(RegionFromId(lv_cicloposizioni))) == "Bmarine")) {
                libNtve_gf_UnitCreateFacingPoint(1, "Marine", 0, 1, RegionGetCenter(RegionFromId(lv_cicloposizioni+1440)), UnitGetPosition(UnitFromId(3)));
                libNtve_gf_MakeUnitUncommandable(UnitLastCreated(), true);
            }
            else {
            }
        }
        return true;
    }
    

    in finish:

    I want build ONE ONLY Bmarine at regionid 11 or 12 or 14 and 55... and found a Marine at region id: 11+1440 or 12+1440 or 14+1440 and 55+1440 ... in the same region id of Bmarine+1440. bUT, if BMARINE havent in some region ID, i want that script build anything

    Posted in: Galaxy Scripting
  • 0

    posted a message on hi how to create in the some position?

    uhm ive a idea.. STORE x-y position of typeA on a variable and position typeB with storedvarible + x1 ...idk.. i try... but have a lot of variable to do, if have a more good method, it is good

    20 x 20 positions x 6 players... very lot of numeber of variable..

    I WILL SEE if with ARRAY[x][x] , i can do something where 1 it si the name of units and second the point of units

    Posted in: Galaxy Scripting
  • To post a comment, please or register a new account.