- Joined
- Jun 28, 2008
- Messages
- 776
Hi, I am very new to Jass and I am creating my first spell, here is what I have so far :
Now the thing I want is that the trigger damages all units in a 250 radius from point2(the random point)
The <><><><><><><><><><> is where I want the code to go. I created a gui trigger and added the converted script, but it gave errors.
SO, my big question is : Is there a easy way to pick units in UnitGroup and then damage them, if the meet the conditions.
Thanks in advance.
++REP
JASS:
function Trig_Earth_Break_JASS_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00Y' ) ) then
return false
endif
return true
endfunction
function Trig_Earth_Break_JASS_Actions takes nothing returns nothing
local unit caster
local location point1
local location point2
local real damage
local integer x = 0
local integer casts
local effect special
set caster = GetTriggerUnit()
set damage = 50*GetUnitAbilityLevelSwapped('A00Y', caster)
set casts = 8
loop
set x = x + 1
exitwhen x == casts
set point1 = GetUnitLoc(caster)
set point2 = PolarProjectionBJ(point1, GetRandomReal(0, 500.00), GetRandomReal(0, 360.00))
call AddSpecialEffectLocBJ(point2, "Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl")
set special = GetLastCreatedEffectBJ()
call TriggerSleepAction(0.06)
call DestroyEffectBJ(special)
<<>><<>><<>><<>><<<>>><<<>>><<>>
call RemoveLocation(point1)
call RemoveLocation(point2)
endloop
endfunction
//===========================================================================
function InitTrig_Earth_Break_JASS takes nothing returns nothing
set gg_trg_Earth_Break_JASS = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Earth_Break_JASS, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Earth_Break_JASS, Condition( function Trig_Earth_Break_JASS_Conditions ) )
call TriggerAddAction( gg_trg_Earth_Break_JASS, function Trig_Earth_Break_JASS_Actions )
endfunction
Now the thing I want is that the trigger damages all units in a 250 radius from point2(the random point)
The <><><><><><><><><><> is where I want the code to go. I created a gui trigger and added the converted script, but it gave errors.
SO, my big question is : Is there a easy way to pick units in UnitGroup and then damage them, if the meet the conditions.
Thanks in advance.
++REP