manofsteel
New Member
- Reaction score
- 36
Whats wrong with this? I keep getting this error^...
(Also some BJ's I need help with.)
The unit is supposed to be teleported and create copies of himself at his position and damage nearby enemies.
Hole code:
JASS:
call UnitDamagePointLoc( GetTriggerUnit(), 0.1, 150, dp,dmg)
(Also some BJ's I need help with.)
The unit is supposed to be teleported and create copies of himself at his position and damage nearby enemies.
Hole code:
JASS:
function Trig_WindWalk_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 039;A010039;
endfunction
function Trig_WindWalk_Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local location t = GetSpellTargetLoc()
local location cp = GetUnitLoc(c)
local location p
local real dis = 0
local location wp
local real dmg = I2R(GetHeroStatBJ(bj_HEROSTAT_AGI, GetTriggerUnit(), false)) + (udg_SpellDamage[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))])
local location dp
local integer looper = 1
local integer looperend = ( GetUnitAbilityLevelSwapped(039;A010039;, c) * 4 )
call SetUnitFacingToFaceLocTimed( c, t, 0 )
set wp = PolarProjectionBJ(cp, ( I2R(GetUnitAbilityLevelSwapped(039;A010039;, c)) * 400.00 ), GetUnitFacing(c))
loop
exitwhen looper > looperend
set dis = dis + 100.00
set p = PolarProjectionBJ(cp, dis, GetUnitFacing(c))
call CreateNUnitsAtLocFacingLocBJ( 1, 039;h007039;, GetOwningPlayer(c), p, t )
call UnitApplyTimedLifeBJ( 1.00, 039;BTLF039;, GetLastCreatedUnit() )
set dp = GetUnitLoc(GetLastCreatedUnit())
call SetUnitVertexColorBJ( GetLastCreatedUnit(), 100.00, 100, 100, 70.00 )
call UnitDamagePointLoc( GetTriggerUnit(), 0.1, 150, dp,dmg)
call RemoveLocation(dp)
set looper = looper + 1
call RemoveLocation(p)
endloop
call SetUnitPositionLoc( c, wp )
call RemoveLocation (wp)
call RemoveLocation (t)
call RemoveLocation (cp)
set wp = null
set c = null
set t = null
set cp = null
set p = null
set dp = null
endfunction
//===========================================================================
function InitTrig_WindWalk takes nothing returns nothing
set gg_trg_WindWalk = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_WindWalk, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_WindWalk, Condition( function Trig_WindWalk_Conditions ) )
call TriggerAddAction( gg_trg_WindWalk, function Trig_WindWalk_Actions )
endfunction