Recent content by huanAk

  1. H

    Fatal Error :(

    try these out : on your 2nd trigger, try display message with follow information : - Ability - name of each aAbility[iAbility] I though you should set iAbility =0 & iInteger =0 on start ? depend on how you use it
  2. H

    Leaking? [just read something that put doubts in my mind about this function]

    local unit u = GetTriggerUnit() -- you only allocate 1 "block" of memory to this variable local unit u set u = GetTriggerUnit() -- you allocate 1 "block" in first line. -- then 2nd "block' from 2nd line so you need to call "set u =null" to clear 2nd block and move back to original. because...
  3. H

    Freaky trigger problem

    It may cause by : - You remove leak somewhere and accident remove "Move_pointA[4]" - something wrong with your region 4 - some other trigger happen when unit enter region 4 (eg, duplicate trigger) also you can try change your first trigger to Move1 Events Unit - A unit enters...
  4. H

    [Help] Load screen

    yes, I can confirm that. some PC will automatic adjust can display, other PC will display as white color. (this happen for Preview picture as well, correct size should be 128x128, but 100x100 may work in some PC, or white color in other PC)
  5. H

    Leaking? [just read something that put doubts in my mind about this function]

    unit u do not leak. it will leak if you write them in this way : local unit u set u = GetTriggerUnit() (now, you have to set u to null at the end) I am a bit lost on 2nd part : - if you only call MakeSpinUnit once, then you don't need destory trigger, because it is it register with...
  6. H

    Better/cleaner way to do this "turning while sliding" trigger?

    I put question mark because I am not 100% sure about what I said. I know IssueImmediateOrder( slider, "hold" ) will stop any movement action(and a queue of movement action in your SHIFT+right click queue), and I am not sure about "stop", it will stop current action, but do it still performance...
  7. H

    Trigger reduce attack cooldwon

    you can create 10 difference new ability : - reduce attack speed by 10% (use speed buff with negative value) - reduce attack speed by 20% - reduce attack speed by 30% - reduce attack speed by 40% - reduce attack speed by 50% - reduce attack speed by 60% - reduce attack speed by 70% - reduce...
  8. H

    best way to: Store the units with highest custom value first in a unit array?

    Wrong, "bubble sort" is compare every adjacent pair (Best case= N, worse case= N^2 mine is "selection sort" which pick highest unit in every turn (always N^2) merge sort may have better average case ( N*logN ). but it may slower because : - math compare is so fast, so N^2 compare won't take...
  9. H

    Better/cleaner way to do this "turning while sliding" trigger?

    call IssueImmediateOrder( slider, "stop" ) <-- will stop current action ? call IssueImmediateOrder( slider, "hold" ) <-- will clear all action in queue ?
  10. H

    Leaking? [just read something that put doubts in my mind about this function]

    you can't destroy and reinitialize it. unless you mean : destroy trigger and re-create it (call MakeSpinUnit will automatic create it) disable trigger and reinitialize it <-- leak, because MakeSpinUnit will automatic create it again
  11. H

    How to get average of all player levels?

    Global Variable : Hero_Group // keep all hero in this group Global variable: Average_level // you can access average_level at anywhere of game :) Global variable: Temp_integer Actions Set Temp_integer =0 Unit Group - Pick every unit in Hero_Group and do (Actions) Loop - Actions...
  12. H

    best way to: Store the units with highest custom value first in a unit array?

    did you try ? - it sorted every unit in your unit group, - and store them in array, order by custom value (from highest to lowest) It is GUI trigger which only take a few click. I don't understand why you need to - download 2 page of code from other people and - require NewGen - require...
  13. H

    Leaking? [just read something that put doubts in my mind about this function]

    Set variable to another unit do not leak. because it still have same amount of memory happen. unlike CreateGroup(), it allocate new memory block, so it will leak if you don't clear old group (release old memory block).
  14. H

    Better/cleaner way to do this "turning while sliding" trigger?

    I don't know what you try to do. but you can try set unit's speed to 0, change facing, then set back to default speed. so unit still have their old order (spell or target)
Top