1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  4. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  5. Units have been turned into heroes in our latest Icon Contest! Vote for the best icon set at the Icon Contest #18 Poll!
    Dismiss Notice
  6. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  7. The raddest synthwave tracks were chosen - Check out our Music Contest #12 - Results and congratulate the winners!
    Dismiss Notice
  8. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[JASS] Difficult Problem (this is not like the other i posted, it is the next level in J

Discussion in 'Triggers & Scripts' started by Flame_Phoenix, Aug 28, 2007.

  1. Flame_Phoenix

    Flame_Phoenix

    Joined:
    May 4, 2007
    Messages:
    2,283
    Resources:
    11
    Tools:
    1
    Maps:
    1
    Spells:
    6
    Tutorials:
    3
    Resources:
    11
    You are c100% wrong ... Arrays and loops DO make my script more complicated because they NEED a superior level of knowledge about programing and bout JASS. Because i am still trying to reach that level i decided to keep things simple for now.
    And as i said:
    Also loops ARE slower according to PP:

    This sentence can be found in page 9 (yes, i actually took some time to re-read those pages .... )

    And to end
    This thread means no HARM to THW community .... So i see no reason for deleting it. Also, the thread will be closed once i finish my system ,which will take a while because i have constant question.
    I also don't see the problem of thread having 11 pages ... It's just big ....

    To end, i just want to say, that if you don't have any suggestions or constructive comments, than DON'T post. Also, please don't make me repeat myself 100 times .... it's the third time i answer to the loops and arrays question ... please read some post b4 posting ...
    My script's are huge but yet, extremelly easy to understand and follow.

    Also, please answer my question PP or Silvernon or any1 else ... i really need to know.

    Please =)
     
  2. PurplePoot

    PurplePoot

    Joined:
    Dec 14, 2005
    Messages:
    11,161
    Resources:
    3
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    Not very much at all, the main drawback of an array is that it takes an additional operation to read and write to (OP limit hurts 'cause of this, if you have massive amounts of operations).

    And Arrays and Loops don't really make the script much more complicated <imo>, even with little programming knowledge.
     
  3. Flame_Phoenix

    Flame_Phoenix

    Joined:
    May 4, 2007
    Messages:
    2,283
    Resources:
    11
    Tools:
    1
    Maps:
    1
    Spells:
    6
    Tutorials:
    3
    Resources:
    11
    Again, you are tellng me a simple rule of life : "Every thing we already know it's easy for us !! Everything else... is not !"

    You find it easy because you are a professional in JASS ... I am not a pro at JASS, i am a "student".

    Also, i strongly remmember using loops and arrays in my script during 3 months, and the result was a NON working system.

    I prefer to keep things this way, and then, move to the more advanced step later.
     
  4. PurplePoot

    PurplePoot

    Joined:
    Dec 14, 2005
    Messages:
    11,161
    Resources:
    3
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    Speaking from experience, FP, it took me ~1 minute to fully understand arrays + loops, and that's all.

    Maybe it's just me though.
     
  5. Flame_Phoenix

    Flame_Phoenix

    Joined:
    May 4, 2007
    Messages:
    2,283
    Resources:
    11
    Tools:
    1
    Maps:
    1
    Spells:
    6
    Tutorials:
    3
    Resources:
    11
    LOL !!! Is JASS your 1st prog language ???? Because it is for me. Also no1 is equal to no1. Your brain can be great at some areas and mine can be better than yours at other areas. Every1 is unique in the world.

    Your barin works better with arrays and loops, but mine doesn't for now. Althought, my brain can qork better with more complicated stuff (somehow i usually don't understand simple things, but i tend to understand complex and difficult concepts that most people can't easely understand).

    Still, I won't repeat myself again ...
    Also please tell me if
     
  6. PurplePoot

    PurplePoot

    Joined:
    Dec 14, 2005
    Messages:
    11,161
    Resources:
    3
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    No, but I'm saying when I initially learned them ;)

    The Question --

    call TriggerExecute(someTrigger)
    (ignores conditions)
     
  7. Flame_Phoenix

    Flame_Phoenix

    Joined:
    May 4, 2007
    Messages:
    2,283
    Resources:
    11
    Tools:
    1
    Maps:
    1
    Spells:
    6
    Tutorials:
    3
    Resources:
    11
    MMMM, i already knew about that answer ... i don't really run a function, i run a new trigger .... i am trying to avoid creating roo many triggers ... My questiuons, is if there is anyway for me to call another function ...

    Also, if you already know other languages, then ofc it is easeir for you to learn JASS ...
     
  8. PurplePoot

    PurplePoot

    Joined:
    Dec 14, 2005
    Messages:
    11,161
    Resources:
    3
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    Erm...

    call ExecuteFunc("funcname")

    call funcname()

    What I had said is that it was easy to me when I learned those languages.
     
  9. Flame_Phoenix

    Flame_Phoenix

    Joined:
    May 4, 2007
    Messages:
    2,283
    Resources:
    11
    Tools:
    1
    Maps:
    1
    Spells:
    6
    Tutorials:
    3
    Resources:
    11
    AHHHH Thx, that was what i was lookinf for =).

    Also .... blarg ... no comments. If you really have a facility to learn programing language then you should take advantage of it, it may be good in a nearby future to be a techinal support guy or even better. Nowaday the more you know the better you are, because the more money you get (generally).

    EDIT AHHH good, your calls work in perfection with my trigger =) thx a lot =)
     
    Last edited: Oct 24, 2007
  10. Flame_Phoenix

    Flame_Phoenix

    Joined:
    May 4, 2007
    Messages:
    2,283
    Resources:
    11
    Tools:
    1
    Maps:
    1
    Spells:
    6
    Tutorials:
    3
    Resources:
    11
    JESUS i am afk 5 dyas and my post gets to the 2nd page lol ...

    Anyway, i am just here to say that my REWARD system finally nearlly works !! lol. It is concluded now and it just needs a few timing adjustments =).
    So, this is my last post, where i will give you a chance to see my script.
    I would like to thank to all who helped me achieve such a work =).

    Code (vJASS):
    globals
        group array udg_UT
    endglobals
    //====================================================
    function First_Seq_Effects takes nothing returns nothing
        local effect ef1
        local effect ef2
        set ef1 = AddSpecialEffect("Doodads\\Cinematic\\FrostTrapUp\\FrostTrapUp.mdl", -6260.0, 5335.5)
        set ef2 = AddSpecialEffect("Doodads\\Cinematic\\FrostTrapUp\\FrostTrapUp.mdl", -5775.5, 5335.5)
        call TriggerSleepAction(1.3)
        call DestroyEffect(ef1)
        call DestroyEffect(ef2)
        set ef1 = AddSpecialEffect("Doodads\\Cinematic\\FrostTrapUp\\FrostTrapUp.mdl", -6260.0, 5185.5)
        set ef2 = AddSpecialEffect("Doodads\\Cinematic\\FrostTrapUp\\FrostTrapUp.mdl", -5775.5, 5185.5)
        call TriggerSleepAction(1.3)
        call DestroyEffect(ef1)
        call DestroyEffect(ef2)
        set ef1 = AddSpecialEffect("Doodads\\Cinematic\\FrostTrapUp\\FrostTrapUp.mdl", -6260.0, 5035.5)
        set ef2 = AddSpecialEffect("Doodads\\Cinematic\\FrostTrapUp\\FrostTrapUp.mdl", -5775.5, 5035.5)
        call TriggerSleepAction(1.3)
        call DestroyEffect(ef1)
        call DestroyEffect(ef2)
        set ef1 = AddSpecialEffect("Doodads\\Cinematic\\FrostTrapUp\\FrostTrapUp.mdl", -6260.0, 4885.5)
        set ef2 = AddSpecialEffect("Doodads\\Cinematic\\FrostTrapUp\\FrostTrapUp.mdl", -5775.5, 4885.5)
        call TriggerSleepAction(1.3)
        call DestroyEffect(ef1)
        call DestroyEffect(ef2)
        set ef1 = AddSpecialEffect("Doodads\\Cinematic\\FrostTrapUp\\FrostTrapUp.mdl", -6260.0, 4735.5)
        set ef2 = AddSpecialEffect("Doodads\\Cinematic\\FrostTrapUp\\FrostTrapUp.mdl", -5775.5, 4735.5)
        call TriggerSleepAction(1.3)
        call DestroyEffect(ef1)
        call DestroyEffect(ef2)
        set ef1 = AddSpecialEffect("Doodads\\Cinematic\\FrostTrapUp\\FrostTrapUp.mdl", -6260.0, 4585.5)
        set ef2 = AddSpecialEffect("Doodads\\Cinematic\\FrostTrapUp\\FrostTrapUp.mdl", -5775.5, 4585.5)
        call TriggerSleepAction(1.3)
        call DestroyEffect(ef1)
        call DestroyEffect(ef2)
        set ef1 = AddSpecialEffect("Doodads\\Cinematic\\FrostTrapUp\\FrostTrapUp.mdl", -6260.0, 4435.5)
        set ef2 = AddSpecialEffect("Doodads\\Cinematic\\FrostTrapUp\\FrostTrapUp.mdl", -5775.5, 4435.5)
        call TriggerSleepAction(2.0)
        call DestroyEffect(ef1)
        call DestroyEffect(ef2)  
        set ef1 = null
        set ef2 = null
        call TriggerSleepAction(0.5)
        call ExecuteFunc("Second_Seq_Effects")
    endfunction
    //====================================================
    function Second_Seq_Effects takes nothing returns nothing
        local unit eff1
        local unit eff2
        local unit eff3
        local unit eff4
        local unit eff5
        local unit eff6
        local unit eff7
        local unit eff8
        local unit eff9
        local unit eff10
        local unit eff11
        local unit eff12  
        set eff1 = CreateUnit(Player(5),'h01N', -6260.0, 5335.5, 0.00)
        call SetUnitAnimation(eff1, "stand second")
        set eff2 = CreateUnit(Player(5),'h01N', -5775.5, 5335.5, 0.00)
        call SetUnitAnimation(eff2, "stand second")
        set eff3 = CreateUnit(Player(5),'h01N', -6260.0, 5185.5, 0.00)
        call SetUnitAnimation(eff3, "stand second")
        set eff4 = CreateUnit(Player(5),'h01N', -5775.5, 5185.5, 0.00)
        call SetUnitAnimation(eff4, "stand second")
        set eff5 = CreateUnit(Player(5),'h01N', -6260.0, 5035.5, 0.00)
        call SetUnitAnimation(eff5, "stand second")
        set eff6 = CreateUnit(Player(5),'h01N', -5775.5, 5035.5, 0.00)
        call SetUnitAnimation(eff6, "stand second")
        set eff7 = CreateUnit(Player(5),'h01N', -6260.0, 4885.5, 0.00)
        call SetUnitAnimation(eff7, "stand second")
        set eff8 = CreateUnit(Player(5),'h01N', -5775.5, 4885.5, 0.00)
        call SetUnitAnimation(eff8, "stand second")
        set eff9 = CreateUnit(Player(5),'h01N', -6260.0, 4735.5, 0.00)
        call SetUnitAnimation(eff9, "stand second")
        set eff10 = CreateUnit(Player(5),'h01N', -5775.5, 4735.5, 0.00)
        call SetUnitAnimation(eff10, "stand second")
        set eff11 = CreateUnit(Player(5),'h01N', -6260.0, 4585.5, 0.00)
        call SetUnitAnimation(eff11, "stand second")
        set eff12 = CreateUnit(Player(5),'h01N', -5775.5, 4585.5, 0.00)
        call SetUnitAnimation(eff12, "stand second")
        call TriggerSleepAction(7.0)
        call KillUnit(eff1)
        call KillUnit(eff2)
        call KillUnit(eff3)
        call KillUnit(eff4)
        call KillUnit(eff5)
        call KillUnit(eff6)
        call KillUnit(eff7)
        call KillUnit(eff8)
        call KillUnit(eff9)
        call KillUnit(eff10)
        call KillUnit(eff11)
        call KillUnit(eff12)  
        set eff1 = null
        set eff2 = null
        set eff3 = null
        set eff4 = null
        set eff5 = null
        set eff6 = null
        set eff7 = null
        set eff8 = null
        set eff9 = null
        set eff10 = null
        set eff11 = null
        set eff12 = null  
    endfunction      
    //====================================================
    function army_acts takes nothing returns nothing  
        local player P1 = Player(0)
        local player P6 = Player(5)
        local unit gate
        local unit m1
        local unit m2
        local unit m3
        local unit m4
        local unit m5
        local unit m6
        local unit m7
        local unit m8
        local unit r1
        local unit r2
        local unit r3
        local unit r4
        local unit r5
        local unit r6
        local unit r7
        local unit r8
        local unit h1
        local unit t = GetTrainedUnit()
        local effect ef
        call GroupAddUnit(udg_UT[0], t)
        if CountUnitsInGroup(udg_UT[0]) == 2 then
            call CameraSetTargetNoiseEx(10, 500000, true)  
            call CameraSetSourceNoiseEx(10, 500000, true)  
            set ef = AddSpecialEffect("Abilities\\Spells\\Human\\FlameStrike\\FlameStrikeTarget.mdl",-6030.5, 5450.5)
            call TriggerSleepAction(1.0)  
            set gate = CreateUnit( P6, 'hprt', -6030.5, 5450.5, 270.0)
            call SetUnitAnimation(gate, "birth")
            call SetUnitTimeScale(gate, 85.00 * 0.01)
            call TerrainDeformationRippleBJ( 7.50, false, Location(-6030.50, 5450.50), 100.00, 800.00, -150.00, 0.35, 1.00 )      
            call DestroyEffect(ef)
            call DisplayTextToForce (bj_FORCE_ALL_PLAYERS, ( "The First Northrend Army arrived to aid |cffff0000" + ( GetPlayerName(P1) + "|r and his alliance !!!!! " ) ) )
            call TriggerSleepAction(8.25)
            call ExecuteFunc("First_Seq_Effects")
            set h1 = CreateUnit(P6, 'H015', -6040.5, 5235.0, 270.00)
            call UnitApplyTimedLife(CreateUnit(P6, 'h01B', -6040.5, 5235.0, 0.00),'BTLF',1.00)
            call SetUnitInvulnerable(h1, true)
            call SetUnitMoveSpeed( h1, ( GetUnitDefaultMoveSpeed(h1)/2))
            call IssuePointOrder(h1, "move", -6040.5, 4450.0)
            call TriggerSleepAction (0.75)
            set m1 = CreateUnit(P6, 'h00B', -6160.0, 5335.5, 270.00)
            call UnitApplyTimedLife(CreateUnit(P6, 'h01B', -6161.0, 5335.5, 0.00),'BTLF',1.00)
            call SetUnitInvulnerable(m1, true)
            call SetUnitMoveSpeed( m1, ( GetUnitDefaultMoveSpeed(m1)/2))
            set m2 = CreateUnit(P6, 'h00B', -6065.3, 5335.5, 270.00)
            call UnitApplyTimedLife(CreateUnit(P6, 'h01B', -6065.3, 5335.5, 0.00),'BTLF',1.00)
            call SetUnitInvulnerable(m2, true)
            call SetUnitMoveSpeed( m2, ( GetUnitDefaultMoveSpeed(m2)/2 ))
            set m3 = CreateUnit(P6, 'h00B', -5970.5, 5335.5, 270.00)
            call UnitApplyTimedLife(CreateUnit(P6, 'h01B', -5973.5, 5335.5, 0.00),'BTLF',1.00)
            call SetUnitInvulnerable(m3, true)
            call SetUnitMoveSpeed( m3, ( GetUnitDefaultMoveSpeed(m3) /2 ))
            set m4 = CreateUnit(P6, 'h00B', -5875.5, 5335.5, 270.00)
            call UnitApplyTimedLife(CreateUnit(P6, 'h01B', -5874.2, 5335.5, 0.00),'BTLF',1.00)
            call SetUnitInvulnerable(m4, true)
            call SetUnitMoveSpeed( m4, ( GetUnitDefaultMoveSpeed(m4) /2))
            call IssuePointOrder(m1, "move", -6160.0,4545.0)
            call IssuePointOrder(m2, "move", -6065.3,4545.0)
            call IssuePointOrder(m3, "move", -5970.5,4545.0)
            call IssuePointOrder(m4, "move", -5875.2,4545.0)
            call TriggerSleepAction(0.75)
            set m5 = CreateUnit(P6, 'h00B', -6160.0, 5335.5, 270.00)
            call UnitApplyTimedLife(CreateUnit(P6, 'h01B', -6161.0, 5335.5, 0.00),'BTLF',1.00)
            call SetUnitInvulnerable(m5, true)
            call SetUnitMoveSpeed( m5, ( GetUnitDefaultMoveSpeed(m5)/2))
            set m6 = CreateUnit(P6, 'h00B', -6065.0, 5335.5, 270.00)
            call UnitApplyTimedLife(CreateUnit(P6, 'h01B', -6065.0, 5335.5, 0.00),'BTLF',1.00)
            call SetUnitInvulnerable(m6, true)
            call SetUnitMoveSpeed( m6, ( GetUnitDefaultMoveSpeed(m6)/2 ))
            set m7 = CreateUnit(P6, 'h00B', -5970.5, 5335.5, 270.00)
            call UnitApplyTimedLife(CreateUnit(P6, 'h01B', -5970.5, 5335.5, 0.00),'BTLF',1.00)
            call SetUnitInvulnerable(m7, true)
            call SetUnitMoveSpeed( m7, ( GetUnitDefaultMoveSpeed(m7) /2 ))
            set m8 = CreateUnit(P6, 'h00B', -5875.0, 5335.5, 270.00)
            call UnitApplyTimedLife(CreateUnit(P6, 'h01B', -5875.0, 5335.5, 0.00),'BTLF',1.00)
            call SetUnitInvulnerable(m8, true)
            call SetUnitMoveSpeed( m8, ( GetUnitDefaultMoveSpeed(m8) /2))
            call IssuePointOrder(m5, "move", -6161.0,4635.0)
            call IssuePointOrder(m6, "move", -6065.3,4635.0)
            call IssuePointOrder(m7, "move", -5973.5,4635.0)
            call IssuePointOrder(m8, "move", -5874.2,4635.0)
            call TriggerSleepAction(0.75)
            set r1 = CreateUnit(P6, 'hrif', -6160.0, 5335.5, 270.00)
            call UnitApplyTimedLife(CreateUnit(P6, 'h01B', -6160.0, 5335.5, 0.00),'BTLF',1.00)
            call SetUnitInvulnerable(r1, true)
            call SetUnitMoveSpeed( r1, ( GetUnitDefaultMoveSpeed(r1)/2 ))
            set r2 = CreateUnit(P6, 'hrif', -6065.0, 5335.5, 270.00)
            call UnitApplyTimedLife(CreateUnit(P6, 'h01B', -6065.0, 5335.5, 0.00),'BTLF',1.00)
            call SetUnitInvulnerable(r2, true)
            call SetUnitMoveSpeed( r2, ( GetUnitDefaultMoveSpeed(r2)/2 ))
            set r3 = CreateUnit(P6, 'hrif', -5970.5, 5335.5, 270.00)
            call UnitApplyTimedLife(CreateUnit(P6, 'h01B', -5970.5, 5335.5, 0.00),'BTLF',1.00)
            call SetUnitInvulnerable(r3, true)
            call SetUnitMoveSpeed( r3, ( GetUnitDefaultMoveSpeed(r3)/2 ))
            set r4 = CreateUnit(P6, 'hrif', -5875.0, 5335.5, 270.00)
            call UnitApplyTimedLife(CreateUnit(P6, 'h01B', -5875.0, 5335.5, 0.00),'BTLF',1.00)
            call SetUnitInvulnerable(r4, true)
            call SetUnitMoveSpeed( r4, ( GetUnitDefaultMoveSpeed(r4)/2))
            call IssuePointOrder(r1, "move", -6160.0,4735.0)
            call IssuePointOrder(r2, "move", -6065.0,4735.0)
            call IssuePointOrder(r3, "move", -5970.5,4735.0)
            call IssuePointOrder(r4, "move", -5875.0,4735.0)
            call TriggerSleepAction(0.75)
            set r5 = CreateUnit(P6, 'hrif', -6160.0, 5335.5, 270.00)
            call UnitApplyTimedLife(CreateUnit(P6, 'h01B', -6160.0, 5335.5, 0.00),'BTLF',1.00)
            call SetUnitInvulnerable(r5, true)
            call SetUnitMoveSpeed( r5, ( GetUnitDefaultMoveSpeed(r5)/2 ))
            set r6 = CreateUnit(P6, 'hrif', -6065.0, 5335.5, 270.00)
            call UnitApplyTimedLife(CreateUnit(P6, 'h01B', -6065.0, 5335.5, 0.00),'BTLF',1.00)
            call SetUnitInvulnerable(r6, true)
            call SetUnitMoveSpeed( r6, ( GetUnitDefaultMoveSpeed(r6)/2 ))
            set r7 = CreateUnit(P6, 'hrif', -5970.5, 5335.5, 270.00)
            call UnitApplyTimedLife(CreateUnit(P6, 'h01B', -5970.5, 5335.5, 0.00),'BTLF',1.00)
            call SetUnitInvulnerable(r7, true)
            call SetUnitMoveSpeed( r7, ( GetUnitDefaultMoveSpeed(r7)/2 ))
            set r8 = CreateUnit(P6, 'hrif', -5875.0, 5335.5, 270.00)
            call UnitApplyTimedLife(CreateUnit(P6, 'h01B', -5875.0, 5335.5, 0.00),'BTLF',1.00)
            call SetUnitInvulnerable(r8, true)
            call SetUnitMoveSpeed( r8, ( GetUnitDefaultMoveSpeed(r8)/2))
            call IssuePointOrder(r5, "move", -6160.0,4840.0)
            call IssuePointOrder(r6, "move", -6065.0,4840.0)
            call IssuePointOrder(r7, "move", -5970.5,4840.0)
            call IssuePointOrder(r8, "move", -5875.0,4840.0)
            call TriggerSleepAction(5.00)
            call SetUnitInvulnerable(h1, false)
            call SetUnitInvulnerable(m1, false)
            call SetUnitInvulnerable(m2, false)
            call SetUnitInvulnerable(m3, false)
            call SetUnitInvulnerable(m4, false)
            call SetUnitInvulnerable(m5, false)
            call SetUnitInvulnerable(m6, false)
            call SetUnitInvulnerable(m7, false)
            call SetUnitInvulnerable(m8, false)
            call SetUnitInvulnerable(r1, false)
            call SetUnitInvulnerable(r2, false)
            call SetUnitInvulnerable(r3, false)
            call SetUnitInvulnerable(r4, false)
            call SetUnitInvulnerable(r5, false)
            call SetUnitInvulnerable(r6, false)
            call SetUnitInvulnerable(r7, false)
            call SetUnitInvulnerable(r8, false)
            call SetUnitOwner(m1, P1, true)
            call SetUnitOwner(m2, P1, true)
            call SetUnitOwner(m3, P1, true)
            call SetUnitOwner(m4, P1, true)
            call SetUnitOwner(m5, P1, true)
            call SetUnitOwner(m6, P1, true)
            call SetUnitOwner(m7, P1, true)
            call SetUnitOwner(m8, P1, true)
            call SetUnitOwner(r1, P1, true)
            call SetUnitOwner(r2, P1, true)
            call SetUnitOwner(r3, P1, true)
            call SetUnitOwner(r4, P1, true)
            call SetUnitOwner(r5, P1, true)
            call SetUnitOwner(r6, P1, true)
            call SetUnitOwner(r7, P1, true)
            call SetUnitOwner(r8, P1, true)
            call SetUnitOwner(h1, P1, true)
            call SetUnitMoveSpeed( h1, ( GetUnitDefaultMoveSpeed(h1)))
            call SetUnitMoveSpeed( m1, ( GetUnitDefaultMoveSpeed(m1) ))
            call SetUnitMoveSpeed( m2, ( GetUnitDefaultMoveSpeed(m2) ))
            call SetUnitMoveSpeed( m3, ( GetUnitDefaultMoveSpeed(m3) ))
            call SetUnitMoveSpeed( m4, ( GetUnitDefaultMoveSpeed(m4) ))
            call SetUnitMoveSpeed( m5, ( GetUnitDefaultMoveSpeed(m1) ))
            call SetUnitMoveSpeed( m6, ( GetUnitDefaultMoveSpeed(m2) ))
            call SetUnitMoveSpeed( m7, ( GetUnitDefaultMoveSpeed(m3) ))
            call SetUnitMoveSpeed( m8, ( GetUnitDefaultMoveSpeed(m4) ))
            call SetUnitMoveSpeed( r1, ( GetUnitDefaultMoveSpeed(r1) ))
            call SetUnitMoveSpeed( r2, ( GetUnitDefaultMoveSpeed(r2) ))
            call SetUnitMoveSpeed( r3, ( GetUnitDefaultMoveSpeed(r3) ))
            call SetUnitMoveSpeed( r4, ( GetUnitDefaultMoveSpeed(r4) ))
            call SetUnitMoveSpeed( r5, ( GetUnitDefaultMoveSpeed(r1) ))
            call SetUnitMoveSpeed( r6, ( GetUnitDefaultMoveSpeed(r2) ))
            call SetUnitMoveSpeed( r7, ( GetUnitDefaultMoveSpeed(r3) ))
            call SetUnitMoveSpeed( r8, ( GetUnitDefaultMoveSpeed(r4) ))
            call KillUnit(gate)  
            call CameraClearNoiseForPlayer( Player(0) )
            set gate = null
            set m1 = null
            set m2 = null
            set m3 = null
            set m4 = null
            set m5 = null
            set m6 = null
            set m7 = null
            set m8 = null
            set r1 = null
            set r2 = null
            set r3 = null
            set r4 = null
            set h1 = null
            set ef = null
            set P1 = null
            set P6 = null
        endif
    endfunction
    //===============================================================
    function InitTrig_Army_P1 takes nothing returns nothing  
        local trigger army = CreateTrigger()  
        call TriggerRegisterPlayerUnitEvent(army, Player(0), EVENT_PLAYER_UNIT_TRAIN_FINISH, null)  
        call TriggerAddAction( army, function army_acts )  
        set army = null
    endfunction


    So here it is =). The gigantic code =). I told you i was going to optimize in the future and i may do so, but it will be in another post.
    I may also decide to post my full system in the spells section in order to say thx to THW community.
    Still THW did nothing to help me, only PP and a few more people really helped me, (silvermoon maybe lol, Hyndi and other that i don't remmember) so i still don't know =D.

    Now this post is here so that i can share what i've learned with every1.
    Thx fot all help.

    Also PurplePoot, you may delete my thread if you wish to, it is 13 pages long :piru: I bet you have never seen such a bid thread in this forum :p

     
  11. Silvenon

    Silvenon

    Joined:
    Nov 22, 2006
    Messages:
    1,233
    Resources:
    1
    Tutorials:
    1
    Resources:
    1
    Congratulations!! You did it man! And it only took you 13 pages......

    I can help you shorten it, I'm good at that. The only problem is.......erghh when I CnP it's all in the same line. What's your method again, Pooty? You said something about quotes, I tried to CnP it in quotes but it didn't break into lines.... :(

    Could you maybe give me a .txt file which contains the code? I'm not in the mood of breaking this code into lines by myself (Ralle should really fix that sometimes....)

    Whoa...???? Why you....... :) (It's Silvenon)
     
  12. Flame_Phoenix

    Flame_Phoenix

    Joined:
    May 4, 2007
    Messages:
    2,283
    Resources:
    11
    Tools:
    1
    Maps:
    1
    Spells:
    6
    Tutorials:
    3
    Resources:
    11
    LOL, ok but it is not complete yet. I just need to do some minor timing adjusts for eye candy.

    EDIT Anyway, here is the notepad you wanted =)
     

    Attached Files:

    Last edited: Nov 2, 2007
  13. PurplePoot

    PurplePoot

    Joined:
    Dec 14, 2005
    Messages:
    11,161
    Resources:
    3
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    Silvenon, press Quote at the bottom of their post. Then it'll open up the "new post" thing, and CnP everything between the JASS tags.
     
  14. Flame_Phoenix

    Flame_Phoenix

    Joined:
    May 4, 2007
    Messages:
    2,283
    Resources:
    11
    Tools:
    1
    Maps:
    1
    Spells:
    6
    Tutorials:
    3
    Resources:
    11
    LOL... why didn't i remember that before ... ...

    Anyway, PP you may delete this thread if you like.
     
  15. Silvenon

    Silvenon

    Joined:
    Nov 22, 2006
    Messages:
    1,233
    Resources:
    1
    Tutorials:
    1
    Resources:
    1
    I'm improving your code atm, I will post the code soon.

    You should really consider working with arrays + loops, because this........is horrible. You'll see later that it will be much easier.
     
  16. Flame_Phoenix

    Flame_Phoenix

    Joined:
    May 4, 2007
    Messages:
    2,283
    Resources:
    11
    Tools:
    1
    Maps:
    1
    Spells:
    6
    Tutorials:
    3
    Resources:
    11
    LOL, easier for people who already understand loops and arrays. but still i will give it a try thx. As long as it is MUI and leak free.
     
  17. Silvenon

    Silvenon

    Joined:
    Nov 22, 2006
    Messages:
    1,233
    Resources:
    1
    Tutorials:
    1
    Resources:
    1
    Here it is, I hope I didn't make a mistake anywhere..... :)

    Ooooooh.......that makes sense, thanks :)
     

    Attached Files:

  18. busterkomo

    busterkomo

    Joined:
    Jun 17, 2007
    Messages:
    1,423
    Resources:
    1
    Tutorials:
    1
    Resources:
    1
    Use coordinates, and natives.