- Joined
- Aug 31, 2014
- Messages
- 137
hey im been working on my map and learning jass on the way and got this error from enchanting the blink spell from warcraft 3 could someone look at it and see what im missing or did wrong?
Edit: I know that the animations and ect are placed wrong
[jass=my spell] function Trig_Demon_Blink_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A077' ) ) then
return false
endif
return true
endfunction
function Trig_Demon_Blink_Actions takes nothing returns nothing
local real X
local real Y
local unit hero
local unit target
local unit dummy
if GetSpellAbilityId () == 'A077' then
set hero = GetTriggerUnit ()
set target = GetSpellTargetUnit ()
set X = GetUnitX (target)
set Y = GetUnitY (target)
call SetUnitAnimation (hero , hero "attack 2" )
call SetUnitAnimation (target , target "death" )
if GetSpellTargetUnit == IsUnitEnemy returns TRUE then
set dummy = CreateUnit (GetTriggerPlayer , 'h00F' , X , Y, 1)
call SetUnitAnimation (hero , hero "attack 2" )
call SetUnitAnimation (target , target "death" )
call UnitDamageTargetBJ (hero ,target , 100 , ATTACK_TYPE_NORMAL , DAMAGE_TYPE_FORCE)
call IssueTargetOrder ( target , "attack" , hero )
if IsUnitType(target, UNIT_TYPE_HERO) == true ) ) then
call IssueTargetOrder (dummy , "stormbolt" , target )
call UnitApplyTimedLife (dummy , 'h00F' , 1 )
else
endif
return false
endfunction
//===========================================================================
function InitTrig_Demon_Blink takes nothing returns nothing
set gg_trg_Demon_Blink = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Demon_Blink, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Demon_Blink, Condition( function Trig_Demon_Blink_Conditions ) )
call TriggerAddAction( gg_trg_Demon_Blink, function Trig_Demon_Blink_Actions )
endfunction
[/code]
if ( not ( GetSpellAbilityId() == 'A077' ) ) then
return false
endif
return true
endfunction
function Trig_Demon_Blink_Actions takes nothing returns nothing
local real X
local real Y
local unit hero
local unit target
local unit dummy
if GetSpellAbilityId () == 'A077' then
set hero = GetTriggerUnit ()
set target = GetSpellTargetUnit ()
set X = GetUnitX (target)
set Y = GetUnitY (target)
call SetUnitAnimation (hero , hero "attack 2" )
call SetUnitAnimation (target , target "death" )
if GetSpellTargetUnit == IsUnitEnemy returns TRUE then
set dummy = CreateUnit (GetTriggerPlayer , 'h00F' , X , Y, 1)
call SetUnitAnimation (hero , hero "attack 2" )
call SetUnitAnimation (target , target "death" )
call UnitDamageTargetBJ (hero ,target , 100 , ATTACK_TYPE_NORMAL , DAMAGE_TYPE_FORCE)
call IssueTargetOrder ( target , "attack" , hero )
if IsUnitType(target, UNIT_TYPE_HERO) == true ) ) then
call IssueTargetOrder (dummy , "stormbolt" , target )
call UnitApplyTimedLife (dummy , 'h00F' , 1 )
else
endif
return false
endfunction
//===========================================================================
function InitTrig_Demon_Blink takes nothing returns nothing
set gg_trg_Demon_Blink = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Demon_Blink, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Demon_Blink, Condition( function Trig_Demon_Blink_Conditions ) )
call TriggerAddAction( gg_trg_Demon_Blink, function Trig_Demon_Blink_Actions )
endfunction
[/code]
Edit: I know that the animations and ect are placed wrong
Last edited: