M
Maximus
Guest
Here is my script:
If it wrong, then please, write the right one. :banghead:
Well, I saved the map and when Validating Map Script it makes all triggers in my map error.
Code:
//===NovaBurst===
function NovaBurst takes integer IndicatorRawCode returns nothing //== Takes Raw Code of the Indicator. Needed to create the caster.
function NovaBurst takes integer SkillRaw returns nothing //== Takes Raw Code of the Damaging Ability. This deals damage. Must have default order string as thunderclap.
function NovaBurst takes integer NovaEffect returns nothing //== Takes Raw Code of the Nova Effect.
function NovaBurst takes integer WhichPlayer returns nothing //== Takes Player Number of Casting Player.
function NovaBurst takes location Where returns nothing //== Takes Position of The Target of Ability Being Cast.
function NovaBurst takes string OrderString returns nothing //== Order string of Nova Ability.
//== Local Declaration ==
local unit TempUnit
local rect TempRect
local group TempUnitGroup
local integer TempInteger
//== Start the Effects ==
set TempUnit = GetLastCreatedUnit()
set TempRect = RectFromCenterSize(GetUnitLoc(GetSpellTargetUnit()), WhereRect, WhereRect)
set TempUnitGroup = GetUnitsInRectMatching(TempRect, Condition( GetOwningPlayer(GetFilterUnit()) != Player(WhichPlayer) ))
set TempInteger = CountUnitsInGroup(TempUnitGroup)
call CreateNUnitsAtLoc( 1, IndicatorRawCode, Player(WhichPlayer), Where, 0.00 )
call UnitAddAbility( SkillRaw, TempUnit )
call UnitApplyTimedLife( 2.00, 'BTLF', TempUnit )
call IssueImmediateOrder( TempUnit, "thunderclap" )
loop
exitwhen TempInteger > 0
set TempUnit = GroupPickRandomUnit(udg_TempUnitGroup)
call CreateNUnitsAtLoc( 1, IndicatorRawCode, Player(WhichPlayer), Where, 0.00 )
call UnitAddAbility( NovaEffect, GetLastCreatedUnit() )
call UnitApplyTimedLife( 2.00, 'BTLF', GetLastCreatedUnit() )
call IssueTargetOrder( GetLastCreatedUnit(), OrderString )
call GroupRemoveUnitSimple( TempUnit, TempUnitGroup )
set TempInteger = CountUnitsInGroup(TempUnitGroup)
endloop
set TempUnit = null
set TempRect = null
set TempUnitGroup = null
set TempInteger = null
call RemoveRect(TempRect)
call DestroyGroup(TempUnitGroup)
endfunction
Well, I saved the map and when Validating Map Script it makes all triggers in my map error.