- Joined
- May 1, 2006
- Messages
- 4
Heya
I'm relatively new to GUI/JASS but I've gotten over the majority of initial hurdles. Something that has me stumped since yesterday, though, has cropped up that I've been trying to resolve (the current solution has to make use of a global, which I'm trying to avoid).
The actual condition is called to match units in range to particular criteria. The matching occurs after initial waiting, so GetTriggerUnit and the like should be unavailable. How can I pass the unit or owning player along to the condition-function without making use of a global?
I've tried:
But I haven't found a way to call it -
- does not compile
Any tricks or ideas?
I'm relatively new to GUI/JASS but I've gotten over the majority of initial hurdles. Something that has me stumped since yesterday, though, has cropped up that I've been trying to resolve (the current solution has to make use of a global, which I'm trying to avoid).
JASS:
function RepelActivationConditions takes nothing returns boolean
..simplified..
elseif (IsUnitAlly(GetFilterUnit(), GetOwningPlayer(udg_RepelTrap)) == true) then
return false
elseif ..simplified..
endif
return true
endfunction
The actual condition is called to match units in range to particular criteria. The matching occurs after initial waiting, so GetTriggerUnit and the like should be unavailable. How can I pass the unit or owning player along to the condition-function without making use of a global?
I've tried:
JASS:
function RepelActivationConditions takes player A returns boolean
But I haven't found a way to call it -
JASS:
set g = GetUnitsInRangeOfLocMatching(150.00, l, Condition(function RepelActivationConditions(A)))
- does not compile
Any tricks or ideas?