- Joined
- Oct 18, 2007
- Messages
- 930
Ok im VERRY new to jass and im trying something but it dosent seem to work
So how can i make this work??
I did:
Would be nice if someone told me why
Does not work.
[+] if someone knew how to make a local group and do the things that i wanted to do, plz post it .
Thx
So how can i make this work??
I did:
-
Kaboom
-
Events
- Unit - A unit Begins casting an ability
-
Conditions
- (Ability being cast) Equal to Suicide Bomb
-
Actions
- Custom script: local unit u = GetTriggerUnit()
- Custom script: local location Kaboom
- Wait 2.00 seconds
- Custom script: set Kaboom = GetUnitLoc( u )
- Custom script: set udg_Group = GetUnitsInRangeOfLocMatching(500.00, Kaboom, Condition(function Trig_Kaboom_Func011002003))
-
Unit Group - Pick every unit in Group and do (Actions)
- Loop - Actions
- Custom script: set u = null
-
Events
JASS:
function Trig_Kaboom_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A000' ) ) then
return false
endif
return true
endfunction
function Trig_Kaboom_Func012002003 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_Kaboom_Func013A takes nothing returns nothing
endfunction
function Trig_Kaboom_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local location Kaboom
call PlaySoundBJ( udg_Lalalalalala[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
call TriggerSleepAction( 2.00 )
call CameraSetEQNoiseForPlayer( GetOwningPlayer(GetTriggerUnit()), 8.00 )
call CreateNUnitsAtLoc( 1, 'h000', GetOwningPlayer(GetTriggerUnit()), GetRectCenter(GetPlayableMapRect()), bj_UNIT_FACING )
call UnitApplyTimedLifeBJ( 4.00, 'BTLF', GetLastCreatedUnit() )
call AddSpecialEffectLocBJ( GetRectCenter(GetPlayableMapRect()), "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
set Kaboom = GetUnitLoc( u )
set udg_Group = GetUnitsInRangeOfLocMatching(500.00, Kaboom, Condition(function Trig_Kaboom_Func011002003))
set udg_Group = GetUnitsInRangeOfLocMatching(500.00, GetRectCenter(GetPlayableMapRect()), Condition(function Trig_Kaboom_Func012002003))
call ForGroupBJ( udg_Group, function Trig_Kaboom_Func013A )
call TriggerSleepAction( 1.50 )
call CameraClearNoiseForPlayer( GetOwningPlayer(GetTriggerUnit()) )
set u = null
endfunction
//===========================================================================
function InitTrig_Kaboom takes nothing returns nothing
set gg_trg_Kaboom = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Kaboom, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Kaboom, Condition( function Trig_Kaboom_Conditions ) )
call TriggerAddAction( gg_trg_Kaboom, function Trig_Kaboom_Actions )
endfunction
Would be nice if someone told me why
JASS:
set udg_Group = GetUnitsInRangeOfLocMatching(500.00, Kaboom, Condition(function Trig_Kaboom_Func011002003))
[+] if someone knew how to make a local group and do the things that i wanted to do, plz post it .
Thx