Basically, the dummy skill will target an area. The skill will:
Create 4 custom units in a preset region (mortars with locust) Play an sound that's included in wc3 Display a text message to all players Order the custom units to "attack ground" random points in the AOE of the dummy skill Do 3 "waves" of these attacks
any help would really be appreciated in helping start with JASS triggering Smile)
Try this: assume - the radius of the dummy spell is 500 - 'h001' is the rawcode of the mortar unit - udg_mortarsregion is the region where the mortars should appear - udg_sound is the sound you specified to be played - the spell´s rawcode is 'A001' - your spell´s trigger is named "mortarfire"
function mortarfire_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A001'
endfunction
function mortarspell takes nothing returns nothing
local location loc=GetSpellTargetLoc()
local unit array mortars
local integer a=0
local integer b=0
local real radius=500
loop
exitwhen a=>4
set mortars[a]=CreateUnitAtLoc(Player(16), 'h001', GetRectCenter(udg_mortarsregion),0)
set a=a+1
endloop
set a=0
call PlaySoundBJ(udg_sound)
call DisplayTextToForce(GetPlayersAll(),"Mortars are now fireing!!")
loop
exitwhen b=>3
loop
exitwhen a=>4
call IssuePointOrderLoc(mortars[a],"attackground",PolarProjectionBJ(loc,GetRandomReal(0,radius),GetRandomDirectionDeg()))
set a=a+1
endloop
call PolledWait(1)
set b=b+1
endloop
set a=0
call RemoveLocation(loc)
set loc=null
loop
exitwhen a=>4
set mortars[a]=null
set a=a+1
endloop
endfunction
function InitTrig_mortarfire takes nothing returns nothing
set gg_trg_mortarfire=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_mortarfire,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_mortarfire,Condition(function mortarfire_Conditions))
call TriggerAddAction(gg_trg_mortarfire,function mortarspell)
endfunction
//edit:corrected typing mistakes and added InitTrig and Condition
Hmm... doesnt happen in my WE. just copied/pasted it into the trigger and it worked maybe you should just copy/paste it into the WE and format it so it looks like that, perhaps its that strange because the php script auto formats the JASS snippet, but I really have no other idea why it shouldnt work.