- Joined
- Sep 29, 2008
- Messages
- 672
Can anyone help me with this. How can I make the flash only show on allies and enemies but not the owner of the caster I think I know how to increase the duration and if you can also remove the invisibility code I very much appreciate it. I don't know this codes I only know GUI triggers.
JASS:
function Trig_StartLightGrenade_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01D' ) ) then
return false
endif
return true
endfunction
function Trig_StartLightGrenade_Func001001003 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == GetOwningPlayer(GetSpellAbilityUnit()) )
endfunction
function Trig_StartLightGrenade_Func001A takes nothing returns nothing
call UnitAddAbilityBJ( 'Agho', GetEnumUnit() )
call GroupAddUnitSimple( GetEnumUnit(), udg_LightGrenadeGroup )
endfunction
function Trig_StartLightGrenade_Func002001 takes nothing returns boolean
return ( GetUnitAbilityLevelSwapped('A01D', GetSpellAbilityUnit()) == 1 )
endfunction
function Trig_StartLightGrenade_Func003001 takes nothing returns boolean
return ( GetUnitAbilityLevelSwapped('A01D', GetSpellAbilityUnit()) == 2 )
endfunction
function Trig_StartLightGrenade_Func004001 takes nothing returns boolean
return ( GetUnitAbilityLevelSwapped('A01D', GetSpellAbilityUnit()) == 3 )
endfunction
function Trig_StartLightGrenade_Func005002 takes nothing returns nothing
call UnitRemoveAbilityBJ( 'Agho', GetEnumUnit() )
endfunction
function Trig_StartLightGrenade_Actions takes nothing returns nothing
local group LightGrenade_Targets
call CinematicFadeBJ( bj_CINEFADETYPE_FADEOUTIN, 0.5, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100.00, 100.00, 100.00, 0 )
call ForGroupBJ( GetUnitsInRangeOfLocMatching(400.00, GetSpellTargetLoc(), Condition(function Trig_StartLightGrenade_Func001001003)), function Trig_StartLightGrenade_Func001A )
if ( Trig_StartLightGrenade_Func002001() ) then
call PolledWait( 4.00 )
else
call DoNothing( )
endif
set LightGrenade_Targets = udg_LightGrenadeGroup
if ( Trig_StartLightGrenade_Func003001() ) then
call PolledWait( 6.00 )
else
call DoNothing( )
endif
if ( Trig_StartLightGrenade_Func004001() ) then
call PolledWait( 8.00 )
else
call DoNothing( )
endif
call ForGroupBJ( LightGrenade_Targets, function Trig_StartLightGrenade_Func005002 )
endfunction
//===========================================================================
function InitTrig_StartLightGrenade takes nothing returns nothing
set gg_trg_StartLightGrenade = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_StartLightGrenade, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_StartLightGrenade, Condition( function Trig_StartLightGrenade_Conditions ) )
call TriggerAddAction( gg_trg_StartLightGrenade, function Trig_StartLightGrenade_Actions )
endfunction