- Joined
- Nov 25, 2008
- Messages
- 1,309
ok, as it says in name, the trigger below is doing the same thing twice, once with damage and one without, im going to convert the dmg one with the nondmg one, which will be finished. Anyways i thought and have seen that JASS functions with TriggerSleepAction() and 'stack' so that both can be called and both can work without any problems, unless using the same global.
-Thanks
JASS:
function Trig_Arcane_Bombardment_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='AHtc'
endfunction
function Trig_Arcane_Bombardment_add takes location l returns nothing//This is ware my problem is
local effect e=AddSpecialEffectLoc("Abilities\\Spells\\NightElf\\Starfall\\StarfallCaster.mdl",l)
call TriggerSleepAction(2.60)
call DestroyEffect(e)
call DestroyEffect(AddSpecialEffectLoc("Abilities\\Spells\\Human\\ReviveHuman\\ReviveHuman.mdl",l))
call DestroyEffect(AddSpecialEffectLoc("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl",l))
endfunction//End problem (lol)
function Trig_Arcane_Bombardment_Actions takes nothing returns nothing
local unit u=GetSpellAbilityUnit()
local integer i=50
local effect array e
local location array l
loop
exitwhen i==0
call Trig_Arcane_Bombardment_add(GetUnitLoc(u))
set l[50-i]=GetUnitLoc(GroupPickRandomUnit(GetUnitsInRangeOfLocAll(750,GetUnitLoc(u))))
set e[50-i]=AddSpecialEffectLoc("Abilities\\Spells\\NightElf\\Starfall\\StarfallCaster.mdl",l[50-i])
set i=i-1
call TriggerSleepAction(.01)
endloop
call TriggerSleepAction(2.667)
loop
exitwhen i>50
call DestroyEffect(e[i])
call DestroyEffect(AddSpecialEffectLoc("Abilities\\Spells\\Human\\ReviveHuman\\ReviveHuman.mdl",l[i]))
call DestroyEffect(AddSpecialEffectLoc("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl",l[i]))
call UnitDamagePointLoc(u,0,250,l[i],100,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC)
call RemoveLocation(l[i])
set i=i+1
endloop
endfunction
function InitTrig_Arcane_Bombardment takes nothing returns nothing
set gg_trg_Arcane_Bombardment=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Arcane_Bombardment,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(gg_trg_Arcane_Bombardment,Condition(function Trig_Arcane_Bombardment_Conditions))
call TriggerAddAction(gg_trg_Arcane_Bombardment,function Trig_Arcane_Bombardment_Actions)
endfunction
Last edited: