Мультибоард система + ассисты как в DotA Я создаю карту типа AoS и очень нуждаюсь в данной наработке, поскольку не имею таких знаний, чтобы самостоятельно сделать такую систему. Если где то уже есть эта система и я проглядел, то скиньте, пожалуйста ссылку. Премного благодарен.
private constant integer SPELL_ID = 'A026' //the rawcode of the spell private constant integer DUMMY_ID = 'e00C' //rw of the dummy unit my omnidummy is used in all my spells private constant string AOE_EFFECT = "pivot.mdl" //effect that will be created when we cast the spell on the AOE private constant string AOE2_EFFECT = "Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl" //another thing used to make this spell cool private constant damagetype D_TYPE = DAMAGE_TYPE_FIRE //the attack type of the spell private constant attacktype A_TYPE = ATTACK_TYPE_MAGIC private constant real RAY_R1 = 0.75 //Red color of the ray private constant real RAY_G1 = 0.5 //Green color private constant real RAY_B1 = 0.0 //blue color private constant real RAY_A1 = 1.0 //Alpha of color 1=no transparency 0=FULL transparency private constant string RAY_ID2 = "FORK" //The rw of ligthing used for the waves private constant real RAY_R2 = 1.0 //Red color of the ray private constant real RAY_G2 = 0.2 //Green color private constant real RAY_B2 = 0.05 //blue color private constant real RAY_A2 = 1.0 //Alpha of color 1=no transparency 0=FULL transparency private constant real Spellaoe = 150 //not sugested to be more than 200 for balance things but whatever
endglobals
private function Range takes integer level returns real return 150. endfunction
private function Waves takes integer level returns real return level * 2. endfunction
private function Delay takes integer level returns real return 0.1 endfunction
private function Damage takes integer level returns real return level * 25. endfunction
private function Actions takes nothing returns nothing local location spellLoc = GetSpellTargetLoc() local unit caster = GetTriggerUnit() local real spellX = GetLocationX(spellLoc) local real spellY = GetLocationY(spellLoc) local location curentwave = GetUnitLoc(caster) local real waveX = GetLocationX(curentwave) local real waveY = GetLocationY(curentwave) local integer level = GetUnitAbilityLevel(caster, SPELL_ID) local real facing = GetUnitFacing(caster) local real Loopspell = 0 set Loopspell = 0 call TriggerSleepAction( .1 ) set facing = GetUnitFacing(caster) loop exitwhen Loopspell == (Waves(level) + 3.) set curentwave = PolarProjectionBJ(GetUnitLoc(caster), ( Range(level) * (Loopspell + 1.50 ) ), facing) set waveX = GetLocationX(curentwave) set waveY = GetLocationY(curentwave) call DestroyEffect(AddSpecialEffect(AOE_EFFECT, waveX, waveY)) call TriggerSleepAction( Delay(level) ) call DestroyEffect(AddSpecialEffect(AOE2_EFFECT, waveX, waveY)) set Loopspell = (Loopspell + 1) call UnitDamagePointLoc( caster,Delay(level), Spellaoe, curentwave, Damage(level), A_TYPE, D_TYPE ) endloop call RemoveLocation(spellLoc) call RemoveLocation(curentwave) set spellLoc = null set curentwave = null set Loopspell = 0 set caster = null endfunction
private function Init takes nothing returns nothing local trigger BurningWavesTrg = CreateTrigger() call TriggerRegisterAnyUnitEventBJ(BurningWavesTrg, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition(BurningWavesTrg, Condition( function Conditions ) ) call TriggerAddAction( BurningWavesTrg, function Actions ) call Preload(AOE_EFFECT) call Preload(AOE2_EFFECT) set bj_lastCreatedUnit = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), DUMMY_ID, 0, 0, 0) call UnitAddAbility(bj_lastCreatedUnit, SPELL_ID) call KillUnit(bj_lastCreatedUnit) endfunction endscope
Добавлено (13.08.2014, 19:30) --------------------------------------------- ПОМоги Мне КАК Не Нанести урон к союзнику и Зданию? где здесь типа условия If UnitType Structure =false?