- Joined
- Feb 14, 2013
- Messages
- 26
Hi, i love to write all code with jass and i have some problem as title, hope someone can help me solved, thank in advance.
- First i have 20 or 30 tower shot at same time, huge damage and fast, it make some lag, can i solved this by change the missile model ?
- When do i use local trigger ?
- Should i use this:
or
- Should i use only 1 trigger for all ability or each trigger for each ability
- First i have 20 or 30 tower shot at same time, huge damage and fast, it make some lag, can i solved this by change the missile model ?
- When do i use local trigger ?
JASS:
globals
trigger trg_Mytrigger = CreateTrigger()
endglobals
JASS:
function ...
local trigger trg_Mytrigger = CreateTrigger()
endfunction
- Should i use this:
JASS:
call ForGroup(GetUnitsOfPlayerAll(p), function RemoveEnumUnit)
JASS:
set group = GetUnitsOfPlayerAll(p)
call ForGroup(group, function RemoveEnumUnit)
call DestrouGroup(group)
- Should i use only 1 trigger for all ability or each trigger for each ability
JASS:
function MyAbilityActions takes nothing returns nothing
if GetSpellAbilityId() == 'A000' then
//Do action
endif
if GetSpellAbilityId() == 'A001' then
//Do action
endif
endfunction
set trg_MyAbility = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(trg_MyAbility, EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddAction(trg_MyAbility, function MyAbilityActions)