on way of learning JASS with try&fail method i have another problem. this time weird because i thought its ok.
i have syntax error here
also i want to ask if my func "FrostWaveMissileHit" can be under actions trigger? or it dosent matter? (because i use it in actions but event of hit which calls it happen after actions)
and last question is if i need to really use I2R here?
set FrostWaveReal = ( FrostWaveReal + ( 90.00 / I2R(FrostWaveInt) ) )
i have syntax error here
JASS:
function FrostWaveMissileHit takes nothing returns nothing
if IsUnitEnemy(GetTriggerUnit(), GetOwningPlayer(FrostWaveCaster)) == true then
call UnitDamageTargetBJ( FrostWaveCaster, GetTriggerUnit(), ( 0.50 * I2R(FrostWaveInt) ) * I2R(GetHeroStatBJ(bj_HEROSTAT_INT, FrostWaveCaster, true)), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
endif
endfunction
function Trig_Frost_Wave_Actions takes nothing returns nothing
local unit FrostWaveCaster = GetSpellAbilityUnit()
local integer FrostWaveInt = GetUnitAbilityLevelSwapped(039;A00U039;, GetSpellAbilityUnit())
local location FrostWavePos = GetUnitLoc(FrostWaveCaster)
local location FrostWavePos2 = GetSpellTargetLoc()
local integer x = 1
local real value = 0
local integer help = 1
if ModuloInteger(FrostWaveInt, 2)==1 then
call CollisionMissile_CreateLoc("war3mapImported\\FrozenOrb.MDX", FrostWavePos, (AngleBetweenPoints(FrostWavePos, FrostWavePos2), 800, 0, ( 200 + (FrostWaveInt * 80)), 30, false, 50, function FrostWaveMissileHit)
loop exitwhen x > FrostWaveInt
set value = value + help * 9 * x
set help = 0 - help
call CollisionMissile_CreateLoc("war3mapImported\\FrozenOrb.MDX", FrostWavePos, (AngleBetweenPoints(FrostWavePos, FrostWavePos2) + value, 800, 0, ( 200 + (FrostWaveInt * 80)), 30, false, 50, function FrostWaveMissileHit)
set FrostWaveReal = ( FrostWaveReal + ( 90.00 / I2R(FrostWaveInt) ) )
set x = x + 1
endloop
else
loop exitwhen x > FrostWaveInt
set value = value + help * 11.25 * x
set help = 0 - help
call CollisionMissile_CreateLoc("war3mapImported\\FrozenOrb.MDX", FrostWavePos, (AngleBetweenPoints(FrostWavePos, FrostWavePos2) + value, 800, 0, ( 200 + (FrostWaveInt * 80)), 30, false, 50, function FrostWaveMissileHit)
set FrostWaveReal = ( FrostWaveReal + ( 90.00 / I2R(FrostWaveInt) ) )
set x = x + 1
endloop
endif
call RemoveLocation(FrostWavePos)
call RemoveLocation(FrostWavePos2)
set FrostWavePos = null
set FrostWavePos2 = null
set FrostWaveCaster = null
endfunction
also i want to ask if my func "FrostWaveMissileHit" can be under actions trigger? or it dosent matter? (because i use it in actions but event of hit which calls it happen after actions)
and last question is if i need to really use I2R here?
set FrostWaveReal = ( FrostWaveReal + ( 90.00 / I2R(FrostWaveInt) ) )