Help Me guys......

Cool_Dude

New Member
Reaction score
0
i made a map which has 2 skills with gui codes "target unit of ability being cast"
but when i cast it both are done and the other only the proir one is executed. help me guys. plz
:banghead::banghead:
 

Igor_Z

You can change this now in User CP.
Reaction score
61
Can you give us more information? Tell us on what spell did you base them in the object editor. Give us the triggers. Go to the trigger editor. Press right click on the name of the trigger and press copy as text, use [WC3 ]Copied Stuff[ /WC3] without the spaces so that we may see what your triggers look like...
 

Cool_Dude

New Member
Reaction score
0

this is one

and

 

Cool_Dude

New Member
Reaction score
0
code of the first skill


function Trig_Shadow_Strike_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A000' ) ) then
return false
endif
return true
endfunction

function Trig_Shadow_Strike_Func010C takes nothing returns boolean
if ( not ( udg_level == 1 ) ) then
return false
endif
return true
endfunction

function Trig_Shadow_Strike_Func011C takes nothing returns boolean
if ( not ( udg_level == 2 ) ) then
return false
endif
return true
endfunction

function Trig_Shadow_Strike_Func012C takes nothing returns boolean
if ( not ( udg_level == 3 ) ) then
return false
endif
return true
endfunction

function Trig_Shadow_Strike_Func013C takes nothing returns boolean
if ( not ( udg_level == 4 ) ) then
return false
endif
return true
endfunction

function Trig_Shadow_Strike_Actions takes nothing returns nothing
set udg_caster = GetTriggerUnit()
set udg_target = GetSpellTargetUnit()
set udg_caster_loc = GetUnitLoc(udg_caster)
set udg_target_loc = GetSpellTargetLoc()
set udg_Strength = GetHeroStatBJ(bj_HEROSTAT_STR, udg_caster, true)
set udg_level = GetUnitAbilityLevelSwapped('A000', udg_caster)
call SetUnitPositionLoc( udg_caster, udg_target_loc )
call AddSpecialEffectLocBJ( udg_caster_loc, "Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
if ( Trig_Shadow_Strike_Func010C() ) then
call UnitDamageTargetBJ( udg_caster, udg_target, ( 4.00 * I2R(udg_Strength) ), ATTACK_TYPE_HERO, DAMAGE_TYPE_NORMAL )
call CreateTextTagUnitBJ( I2S(( udg_Strength * R2I(4.00) )), udg_caster, 0, 10, 100, 5.00, 5.00, 0 )
call SetTextTagPermanentBJ( GetLastCreatedTextTag(), false )
call SetTextTagVelocityBJ( GetLastCreatedTextTag(), 64, 90 )
call SetTextTagFadepointBJ( GetLastCreatedTextTag(), 3.00 )
call SetTextTagLifespanBJ( GetLastCreatedTextTag(), 5 )
else
call DoNothing( )
endif
if ( Trig_Shadow_Strike_Func011C() ) then
call UnitDamageTargetBJ( udg_caster, udg_target, ( 8.00 * I2R(udg_Strength) ), ATTACK_TYPE_HERO, DAMAGE_TYPE_NORMAL )
call CreateTextTagUnitBJ( I2S(( udg_Strength * R2I(8.00) )), udg_caster, 0, 10, 100, 5.00, 5.00, 0 )
call SetTextTagPermanentBJ( GetLastCreatedTextTag(), false )
call SetTextTagVelocityBJ( GetLastCreatedTextTag(), 64, 90 )
call SetTextTagFadepointBJ( GetLastCreatedTextTag(), 3.00 )
call SetTextTagLifespanBJ( GetLastCreatedTextTag(), 5 )
else
call DoNothing( )
endif
if ( Trig_Shadow_Strike_Func012C() ) then
call UnitDamageTargetBJ( udg_caster, udg_target, ( 12.00 * I2R(udg_Strength) ), ATTACK_TYPE_HERO, DAMAGE_TYPE_NORMAL )
call CreateTextTagUnitBJ( I2S(( udg_Strength * R2I(12.00) )), udg_caster, 0, 10, 100, 5.00, 5.00, 0 )
call SetTextTagPermanentBJ( GetLastCreatedTextTag(), false )
call SetTextTagVelocityBJ( GetLastCreatedTextTag(), 64, 90 )
call SetTextTagFadepointBJ( GetLastCreatedTextTag(), 3.00 )
call SetTextTagLifespanBJ( GetLastCreatedTextTag(), 5 )
else
call DoNothing( )
endif
if ( Trig_Shadow_Strike_Func013C() ) then
call UnitDamageTargetBJ( udg_caster, udg_target, ( 16.00 * I2R(udg_Strength) ), ATTACK_TYPE_HERO, DAMAGE_TYPE_NORMAL )
call CreateTextTagUnitBJ( I2S(( udg_Strength * R2I(16.00) )), udg_caster, 0, 10, 100, 5.00, 5.00, 0 )
call SetTextTagPermanentBJ( GetLastCreatedTextTag(), false )
call SetTextTagVelocityBJ( GetLastCreatedTextTag(), 64, 90 )
call SetTextTagFadepointBJ( GetLastCreatedTextTag(), 3.00 )
call SetTextTagLifespanBJ( GetLastCreatedTextTag(), 5 )
else
call DoNothing( )
endif
call IssueTargetOrderBJ( udg_caster, "attack", udg_target )
call TriggerSleepAction( 2.00 )
call SetUnitPositionLoc( udg_caster, udg_caster_loc )
call AddSpecialEffectLocBJ( udg_target_loc, "Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
endfunction

//===========================================================================
function InitTrig_Shadow_Strike takes nothing returns nothing
set gg_trg_Shadow_Strike = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Shadow_Strike, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Shadow_Strike, Condition( function Trig_Shadow_Strike_Conditions ) )
call TriggerAddAction( gg_trg_Shadow_Strike, function Trig_Shadow_Strike_Actions )
endfunction







code of the second one




function Trig_Death_Pact_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A002' ) ) then
return false
endif
return true
endfunction

function Trig_Death_Pact_Actions takes nothing returns nothing
set udg_DP_caster = GetTriggerUnit()
set udg_DP_owner = GetOwningPlayer(udg_DP_caster)
set udg_DP_target = GetSpellTargetUnit()
set udg_DP_targetpoint = GetUnitLoc(udg_DP_target)
set udg_DP_spell = 'A002'
set udg_DP_spelllevel = GetUnitAbilityLevelSwapped('A002', udg_DP_caster)
set udg_DP_basehealth = GetUnitStateSwap(UNIT_STATE_MAX_LIFE, udg_DP_target)
set udg_DP_currenthealth = GetUnitStateSwap(UNIT_STATE_LIFE, udg_DP_target)
set udg_DP_missinghealth = ( udg_DP_basehealth - udg_DP_currenthealth )
set udg_DP_damageconstant = 0.30
set udg_DP_basedamage = ( udg_DP_damageconstant * I2R(udg_DP_spelllevel) )
set udg_DP_realdamage = ( udg_DP_missinghealth * udg_DP_basedamage )
call UnitDamageTargetBJ( udg_DP_caster, udg_DP_target, udg_DP_realdamage, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_SONIC )
call AddSpecialEffectTargetUnitBJ( "origin", udg_DP_target, "Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
endfunction

//===========================================================================
function InitTrig_Death_Pact takes nothing returns nothing
set gg_trg_Death_Pact = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Death_Pact, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Death_Pact, Condition( function Trig_Death_Pact_Conditions ) )
call TriggerAddAction( gg_trg_Death_Pact, function Trig_Death_Pact_Actions )
endfunction
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top