- Joined
- Mar 12, 2006
- Messages
- 407
Okey what i'm trying to do is triggering the Polymorph ability to have an AOE morph efect. Its quite simple, I know but it won't work :shock:
Here's my skript:
What happens is:
The units in the target area get the special efects of polymorphs (sparks and so on, dont know what it is ^^) but they don't morph into sheeps.
I used a dummy which has the standart morph ability i just reduced mana cost and cooldown to zero and disabled the checking of tech requirements.
And the dummies aren't removed from game after they casted.
So my spell is pretty fucked up. It doesnt morph and it creates dummies which stay -.-
Anyone knows why ?
Here's my skript:
function Trig_masssheep_Kopieren_Kopieren_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00I' ) ) then
return false
endif
return true
endfunction
function Trig_masssheep_Kopieren_Kopieren_Func003A takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'h006', GetOwningPlayer(GetSpellAbilityUnit()), udg_v_punkt, bj_UNIT_FACING )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_v_group )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "polymorph", GetEnumUnit() )
endfunction
function Trig_masssheep_Kopieren_Kopieren_Func005002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_masssheep_Kopieren_Kopieren_Actions takes nothing returns nothing
set udg_v_punkt = GetUnitLoc(GetSpellAbilityUnit())
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsInRangeOfLocAll(250.00, GetSpellTargetLoc()), function Trig_masssheep_Kopieren_Kopieren_Func003A )
call RemoveLocation( udg_v_punkt )
call ForGroupBJ( udg_v_group, function Trig_masssheep_Kopieren_Kopieren_Func005002 )
call DestroyGroup( udg_v_group )
endfunction
//===========================================================================
function InitTrig_masssheep_Kopieren_Kopieren takes nothing returns nothing
set gg_trg_masssheep_Kopieren_Kopieren = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_masssheep_Kopieren_Kopieren, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_masssheep_Kopieren_Kopieren, Condition( function Trig_masssheep_Kopieren_Kopieren_Conditions ) )
call TriggerAddAction( gg_trg_masssheep_Kopieren_Kopieren, function Trig_masssheep_Kopieren_Kopieren_Actions )
endfunction
What happens is:
The units in the target area get the special efects of polymorphs (sparks and so on, dont know what it is ^^) but they don't morph into sheeps.
I used a dummy which has the standart morph ability i just reduced mana cost and cooldown to zero and disabled the checking of tech requirements.
And the dummies aren't removed from game after they casted.
So my spell is pretty fucked up. It doesnt morph and it creates dummies which stay -.-
Anyone knows why ?