- Joined
- Sep 26, 2009
- Messages
- 9,529
When converting to JASS directly from GUI, I get two basic types of if/then/else functions above many triggers' actions...
One is really long format:
The other is much shorter format:
Is there a way to make the longer condition (above) into the same format as the shorter condition (below)? +Rep even if someone answered this question before you, I want to understand this function because I use it heavily in the map.
One is really long format:
JASS:
function SLust2 takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped(GetSpellAbilityId(), GetTriggerUnit()) == 1 ) ) then
return false
endif
return true
endfunction
The other is much shorter format:
JASS:
function SLustX takes nothing returns boolean
return ( UnitHasBuffBJ(GetTriggerUnit(), 'B004') == false )
endfunction
Is there a way to make the longer condition (above) into the same format as the shorter condition (below)? +Rep even if someone answered this question before you, I want to understand this function because I use it heavily in the map.