Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
function SummonActions takes nothing returns nothing
local real x
local real y
local unit u
if GetSpellAbilityId() == 'AUan' then //'AUan' <-- You have to change this into the rawcode of your ability
// This is the first summoned unit 'h000' <-- you have to change this into the rawcode of your unit you want to summon
set x = GetLocationX(Location(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))) + 100 * Cos(GetUnitFacing(GetTriggerUnit()) - 20.00 * bj_DEGTORAD)
set y = GetLocationY(Location(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))) + 100 * Sin(GetUnitFacing(GetTriggerUnit()) - 20.00 * bj_DEGTORAD)
set u = CreateUnit(GetOwningPlayer(GetTriggerUnit()),'h000',x,y,GetUnitFacing(GetTriggerUnit()))
call UnitApplyTimedLife(u,'BTLF',60.00)
set u = null
// This is the second summoned unit 'h001' <-- you have to change this into the rawcode of your unit you want summon
set x = GetLocationX(Location(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))) + 100 * Cos(GetUnitFacing(GetTriggerUnit()) + 20.00 * bj_DEGTORAD)
set y = GetLocationY(Location(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))) + 100 * Sin(GetUnitFacing(GetTriggerUnit()) + 20.00 * bj_DEGTORAD)
set u = CreateUnit(GetOwningPlayer(GetTriggerUnit()),'h001',x,y,GetUnitFacing(GetTriggerUnit()))
call UnitApplyTimedLife(u,'BTLF',60.00)
set u = null
endif
endfunction
function InitTrig_Summon takes nothing returns nothing
set gg_trg_Summon = CreateTrigger( ) // The name of the trigger is Summon
call TriggerRegisterAnyUnitEventBJ(gg_trg_Summon, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddAction(gg_trg_Summon,function SummonActions)
endfunction
Summon GUI

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to (==) Animate Dead

Actions


Set TempLoc = (Position of (Triggering unit))


Set TempLoc2 = (TempLoc offset by 100.00 towards ((Facing of (Triggering unit)) - 20.00) degrees)


-------- The first unit --------


Unit - Create 1 Footman for (Owner of (Triggering unit)) at TempLoc2 facing (Facing of (Triggering unit)) degrees


Unit - Add a 60.00 second Generic expiration timer to (Last created unit)


Custom script: call RemoveLocation(udg_TempLoc2)


-------- The second unit --------


Set TempLoc2 = (TempLoc offset by 100.00 towards ((Facing of (Triggering unit)) + 20.00) degrees)


Unit - Create 1 Footman for (Owner of (Triggering unit)) at TempLoc2 facing (Facing of (Triggering unit)) degrees


Unit - Add a 60.00 second Generic expiration timer to (Last created unit)


Custom script: call RemoveLocation(udg_TempLoc2)


Custom script: call RemoveLocation(udg_TempLoc1)
Actions

For each (Integer A) from 1 to 2, do (Actions)


Loop - Actions



Set YourPoint = ((Position of (Triggering unit)) offset by 200.00 towards 0.00 degrees)



Unit - Create 1 Footman for Player 1 (Red) at YourPoint facing Default building facing degrees



Custom script: call RemoveLocation (udg_YourPoint)
that's JAss.
Events:
Unit - A unit starts the effect of an ability
Conditions:
Actions:
Set Temp_Point = (Position of (Trigger Unit))
Unit - Create 2 Pets a Temp_Point
Custom Script: call RemoveLocation (udg_Temp_Point)
~_~ I just type this since I got no world edit here.
Actions
For each (Integer A) from 1 to 2, do (Actions)
Loop - Actions
Set YourPoint = ((Position of (Triggering unit)) offset by 200.00 towards 0.00 degrees)
Unit - Create 1 Footman for Player 1 (Red) at YourPoint facing Default building facing degrees
Custom script: call RemoveLocation (udg_YourPoint)
How to do:
ability that summons for 60 seconds 2 pets (first pet is other than second) i based on summon spirit wolves.
