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
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...
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...
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)
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...
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...
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...
call IssueImmediateOrder( slider, "stop" ) <-- will stop current action ?
call IssueImmediateOrder( slider, "hold" ) <-- will clear all action in queue ?
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
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...
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...
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).
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)
1, can't find any leak with my average JASS skill
2, your funcion didn't leak, as long as you never call "set udg_EnemyUnits = CreateGroup()"
3, yes, you should empty group before call this function, so old unit won't mix with new
4, NO... if you don't use udg_EnemyUnits anymore, then try...
easy, here is how it do in GUI trigger:
temp_unit
temp_integer = 0
for every loop integer A from 0 to (count units in unit_group-1) do multiple action
for every unit in unit_group do multiple action
if custom value of picked unit > temp_integer
temp_integer = custom...