Demi666
New Member
- Reaction score
- 127
ok so im making a spell for my spellpack and i thought before i made anything more on it..
Can outerfunctions know what " GetEnumUnit " and " GetSpellAbilityUnit " is?
here is my code ( unfinished )
and it wont work if outer functions doesent know what it is, couse i cant use handlevars yet
please tell me
Can outerfunctions know what " GetEnumUnit " and " GetSpellAbilityUnit " is?
here is my code ( unfinished )
and it wont work if outer functions doesent know what it is, couse i cant use handlevars yet
please tell me
JASS:
function Trig_Electric_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 039;A004039;
endfunction
function Spell takes nothing returns integer
return 039;A004039;
endfunction
function Dummy_Spell takes nothing returns integer
return 039;A005039;
// edit here for your rawcode
endfunction
function Is_Dead_Or_Not takes nothing returns boolean
return (IsUnitType(GetFilterUnit(), UNIT_TYPE_DEAD) == false)
endfunction
function Is_Unit_Ally takes unit caster returns boolean
return ( IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(caster)))
endfunction
function groupFilter takes nothing returns boolean
return Is_Unit_Ally(GetTriggerUnit()) and Is_Dead_Or_Not()
endfunction
function Buff takes nothing returns integer
return 039;BSTN039;
// Edit here for the Wait Until Condition buff
endfunction
function Unit_Has_Buff takes nothing returns boolean
return UnitHasBuffBJ(GetSpellTargetUnit(),Buff()) == true
endfunction
constant function Wait_For_ConD takes nothing returns real
return 0.27
// Edit here for the cheking between intervals
endfunction
function Dummy takes nothing returns integer
return 039;h000039;
//Edit here for your dummy unit
endfunction
function Spell_Thingy takes nothing returns nothing
local location temp_point = GetUnitLoc(GetEnumUnit())
local location y = GetUnitY(GetEnumUnit())
local location x = GetUnitX(GetEnumUnit())
call CreateUnitAtLoc(GetOwningPlayer
endfunction
function Trig_Electric_Actions takes nothing returns nothing
local unit caster = GetTriggerUnit()
local unit target = GetSpellTargetUnit()
local location loc = GetUnitLoc(target)
local group Group
loop
exitwhen(Unit_Has_Buff())
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL, Wait_For_ConD()))
endloop
set Group = GetUnitsInRangeOfLocMatching(150*(GetUnitAbilityLevel(target,Spell())),loc,Condition(function groupFilter))
call ForGroup(Group,Spell_Thingy())
endfunction
//===========================================================================
function InitTrig_Electric takes nothing returns nothing
set gg_trg_Electric = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Electric, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Electric, Condition( function Trig_Electric_Conditions ) )
call TriggerAddAction( gg_trg_Electric, function Trig_Electric_Actions )
endfunction