Hi, since I was able to some basic spells, I would like to ask why this wont work? I was reading the Grenade Tutorial and followed the MUI JASS thing near the ending of the tutorial, this is what I got:
GUI Version:
JASS:
function Trig_Throw_Start_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A000'
endfunction
function Trig_Throw_Start_Func003001 takes nothing returns boolean
local unit Target = GetSpellTargetUnit()
return ( UnitHasBuffBJ(Target, 'B000') == true )
endfunction
function Trig_Throw_Start_Actions takes nothing returns nothing
local unit Caster = GetTriggerUnit()
local unit DummyUnit
local unit Target = GetSpellTargetUnit()
local location TargetLoc = GetUnitLoc(Target)
loop
exitwhen ( Trig_Throw_Start_Func003001() )
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL, 0.10))
endloop
call DestroyEffectBJ( AddSpecialEffectLocBJ( TargetLoc, "Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl" ))
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set DummyUnit = CreateUnitAtLoc( GetOwningPlayer(Caster), 'h001', TargetLoc, 270.00 )
call UnitAddAbilityBJ( 'A001', DummyUnit )
call UnitApplyTimedLifeBJ( 6.00, 'BTLF', DummyUnit )
set udg_PolarPoint = PolarProjectionBJ(TargetLoc, 200.00, ( 45.00 * I2R(GetForLoopIndexA()) ))
call IssuePointOrderLocBJ( DummyUnit, "breathoffire", udg_PolarPoint )
call RemoveLocation(udg_PolarPoint)
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call UnitRemoveBuffsBJ( bj_REMOVEBUFFS_ALL, Target )
call RemoveLocation(TargetLoc)
set Caster = null
set DummyUnit = null
endfunction
//===========================================================================
function InitTrig_Throw_Start takes nothing returns nothing
set gg_trg_Throw_Start = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Throw_Start, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Throw_Start, Condition( function Trig_Throw_Start_Conditions ) )
call TriggerAddAction( gg_trg_Throw_Start, function Trig_Throw_Start_Actions )
endfunction
GUI Version:
-
Throw Start Copy
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Throw
-
-
Actions
-
Set Target = (Target unit of ability being cast)
-
Set TargetLoc = (Position of Target)
-
Wait until ((Target has buff Burned ) Equal to True), checking every 0.10 seconds
-
Special Effect - Create a special effect at TargetLoc using Abilities\Spells\Other\Doom\DoomDeath.mdl
-
For each (Integer A) from 1 to 8, do (Actions)
-
Loop - Actions
-
Unit - Create 1 Dummy (Throw) for (Owner of (Triggering unit)) at TargetLoc facing Default building facing degrees
-
Set DummyUnit = (Last created unit)
-
Unit - Add Breath of Fire (Neutral Hostile) to DummyUnit
-
Unit - Add a 6.00 second Generic expiration timer to DummyUnit
-
Set PolarPoint = (TargetLoc offset by 200.00 towards (45.00 x (Real((Integer A)))) degrees)
-
Unit - Order DummyUnit to Neutral Pandaren Brewmaster - Breath Of Fire PolarPoint
-
Custom script: call RemoveLocation(udg_PolarPoint)
-
-
-
Unit - Remove All buffs from Target
-
Special Effect - Destroy (Last created special effect)
-
Custom script: call RemoveLocation(udg_TargetLoc)
-
-