scope BurningWaves initializer Init
//===========================================================================
//=============================SETUP START===================================
//===========================================================================
globals
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
private unit ForFilter1
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
//===========================================================================
//=============================SETUP END=====================================
//===========================================================================
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELL_ID
endfunction
function EnemiesFilter takes nothing returns boolean
return (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(ForFilter1)) and GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) > 0.045 and GetUnitAbilityLevel(GetFilterUnit(), 'Avul') == 0 and not IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE))
endfunction
function DamageUnitsInRange takes unit source, real x, real y, real range, real damage, attacktype at returns nothing
local unit victim
local group g = CreateGroup()
set ForFilter1 = source
call GroupEnumUnitsInRange(g, x, y, range, Filter(function EnemiesFilter))
loop
exitwhen(FirstOfGroup(g) != null)
set victim = FirstOfGroup(g)
call UnitDamageTarget(source, victim, damage, true, false, at, DAMAGE_TYPE_NORMAL, WEAPON_TYPE_WHOKNOWS)
call GroupRemoveUnit(g, victim)
endloop
call GroupClear(g)
call DestroyGroup(g)
set g = null
set victim = null
endfunction
private function Actions takes nothing returns nothing
local unit caster = GetTriggerUnit()
local real point_x
local real point_y
local integer level = GetUnitAbilityLevel(caster, SPELL_ID)
local real facing = GetUnitFacing(caster)
local integer Loopspell = 0
set Loopspell = 0
call TriggerSleepAction( .1 )
set facing = GetUnitFacing(caster)
loop
exitwhen Loopspell == (Waves(level) + 3.)
set point_x = GetUnitX(caster) + ((Range(level) * (Loopspell + 1.50 )) * Cos(facing * bj_DEGTORAD))
set point_x = GetUnitY(caster) + ((Range(level) * (Loopspell + 1.50 )) * Sin(facing * bj_DEGTORAD))
call DestroyEffect(AddSpecialEffect(AOE_EFFECT, point_x, point_y))
call TriggerSleepAction( Delay(level) )
call DestroyEffect(AddSpecialEffect(AOE2_EFFECT, point_x, point_y))
set Loopspell = (Loopspell + 1)
call DamageUnitsInRange(caster, point_x, point_y, Spellaoe, Damage(level), A_TYPE)
endloop
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
Ошибки и вейты в цикле.
ты бы оригинал увидел.. если на таймеры переделывать то там все переписывать нужно, ибо это страх
scope BurningWaves initializer Init
//===========================================================================
//=============================SETUP START===================================
//===========================================================================
globals
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
private unit ForFilter1
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
//===========================================================================
//=============================SETUP END=====================================
//===========================================================================
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELL_ID
endfunction
function EnemiesFilter takes nothing returns boolean
return (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(ForFilter1)) and GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) > 0.045 and GetUnitAbilityLevel(GetFilterUnit(), 'Avul') == 0 and not IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE))
endfunction
function DamageUnitsInRange takes unit source, real x, real y, real range, real damage, attacktype at returns nothing
local unit victim
local group g = CreateGroup()
set ForFilter1 = source
call GroupEnumUnitsInRange(g, x, y, range, Filter(function EnemiesFilter))
loop
exitwhen(FirstOfGroup(g) != null)
set victim = FirstOfGroup(g)
call UnitDamageTarget(source, victim, damage, true, false, at, DAMAGE_TYPE_NORMAL, WEAPON_TYPE_WHOKNOWS)
call GroupRemoveUnit(g, victim)
endloop
call GroupClear(g)
call DestroyGroup(g)
set g = null
set victim = null
endfunction
private function Actions takes nothing returns nothing
local unit caster = GetTriggerUnit()
local real point_x
local real point_y
local integer level = GetUnitAbilityLevel(caster, SPELL_ID)
local real facing = GetUnitFacing(caster)
local integer Loopspell = 0
set Loopspell = 0
call TriggerSleepAction( .1 )
set facing = GetUnitFacing(caster)
loop
exitwhen Loopspell == (Waves(level) + 3.)
set point_x = GetUnitX(caster) + ((Range(level) * (Loopspell + 1.50 )) * Cos(facing * bj_DEGTORAD))
set point_x = GetUnitY(caster) + ((Range(level) * (Loopspell + 1.50 )) * Sin(facing * bj_DEGTORAD))
call DestroyEffect(AddSpecialEffect(AOE_EFFECT, point_x, point_y))
call TriggerSleepAction( Delay(level) )
call DestroyEffect(AddSpecialEffect(AOE2_EFFECT, point_x, point_y))
set Loopspell = (Loopspell + 1)
call DamageUnitsInRange(caster, point_x, point_y, Spellaoe, Damage(level), A_TYPE)
endloop
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
Ancient, Этот код я пробовала Все равно зданию наносится damage, мне нужно чтоб условия проверяла много юнитов в точке создания целевой способности GetSpellTargetLoc() типа STRUCTURE = False
я не знаю кто писал этот код, но ему стоит по рукам надавать
код
scope BurningWaves initializer Init
function EnemiesFilter takes nothing returns boolean
return (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(ForFilter1)) and GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) > 0.045 and GetUnitAbilityLevel(GetFilterUnit(), 'Avul') == 0 and not IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE))
endfunction
function DamageUnitsInRange takes unit source, real x, real y, real range, real damage, attacktype at returns nothing
local unit victim
local group g = CG
set ForFilter1 = source
call GroupEnumUnitsInRange(g, x, y, range, Filter(function EnemiesFilter))
loop
exitwhen(FirstOfGroup(g) != null)
set victim = FirstOfGroup(g)
call UnitDamageTarget(source, victim, damage, true, false, at, DAMAGE_TYPE_NORMAL, WEAPON_TYPE_WHOKNOWS)
call GroupRemoveUnit(g, victim)
endloop
call GroupClear(g)
call DestroyGroup(g)
set g = null
set victim = null
endfunction
===========================================================================
=============================SETUP START===================================
===========================================================================
globals
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
private unit ForFilter1
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
===========================================================================
=============================SETUP END=====================================
===========================================================================
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELL_ID
endfunction
private function Actions takes nothing returns nothing
local unit caster = GetTriggerUnit()
local real point_x
local real point_y
local real waveX = GetLocationX(curentwave)
local real waveY = GetLocationY(curentwave)
local integer level = GetUnitAbilityLevel(caster, SPELL_ID)
local real facing = GetUnitFacing(caster)
local integer Loopspell = 0
set Loopspell = 0
call TriggerSleepAction( .1 )
set facing = GetUnitFacing(caster)
loop
exitwhen Loopspell == (Waves(level) + 3.)
set point_x = GetUnitX(caster) + ((Range(level) * (Loopspell + 1.50 )) * Cos(facing * bj_DEGTORAD))
set point_x = GetUnitY(caster) + ((Range(level) * (Loopspell + 1.50 )) * Sin(facing * bj_DEGTORAD))
set waveX = GetLocationX(curentwave)
set waveY = GetLocationY(curentwave)
call DestroyEffect(AddSpecialEffect(AOE_EFFECT, point_x, point_y))
call TriggerSleepAction( Delay(level) )
call DestroyEffect(AddSpecialEffect(AOE2_EFFECT, point_x, point_y))
set Loopspell = (Loopspell + 1)
call DamageUnitsInRange(caster, point_x, point_y, Spellaoe, Damage(level), A_TYPE)
endloop
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
он запутывает, тем более что у шарящих юзеров он не стоит, и при возникшей проблеме вам не смогут помочь без готовой карты, а на нее редко кто расщедрится, более того - статьи все написаны без него, так что и тут вы остаетесь сам с собой и гуи который сложно понять благодаря кривому переводу
хотите сломать себе мышление и заработать проблем - ставьте русификатор
ну у каждого будут свои аиди декораций-текстур, поэтому я только одну функцию описал которая универсальна, да и эффекты от аттачей где то хранить нужно
globals
unit ForFilter1
endglobals
function EnemiesFilter takes nothing returns boolean
return (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(ForFilter1)) and GetHp(GetFilterUnit()) > 0.045 and GetUnitAbilityLevel(GetFilterUnit(), 'Avul') == 0)
endfunction
function DamageUnitsInRange takes unit source, real x, real y, real range, real damage, attacktype at, int filter_type returns nothing
local unit victim
local group g = CreateGroup()
if filter_type == 1 then
call GroupEnumUnitsInRange(g, x, y, range, Filter(function AllFilter))
elseif filter_type == 2 then
set ForFilter1 = source
call GroupEnumUnitsInRange(g, x, y, range, Filter(function EnemiesFilter))
endif
loop
exitwhen FirstOfGroup(g) == null
set victim = FirstOfGroup(g)
call UnitDamageTarget(source, victim, damage, true, false, at, DAMAGE_TYPE_NORMAL, WEAPON_TYPE_WHOKNOWS)
call GroupRemoveUnit(g, victim)
endloop
call GroupClear(g)
call DestroyGroup(g)
set g = null
set victim = null
endfunction
спросите у себя, что у вас есть то, чего нет нигде, что у вас есть из оригинальных идей?
пока что мы подумываем над тем,чтобы сделать несколько режимов игры,но пока эти режимы настолько скучные и однотипные лезут,что даже время на них тратить не хочется.Как придумаем нормальные,сразу опубликуем ресурс.
И вопрос к тебе:какой вид выбора героев является современным,интересным и завлекающим?
полноэкранка например?
и режимы игры это все что вы хотите сделать инновационного?
нет ну как бы парни, я все конешн понимаю, но этого я не понимаю, нужно завлекать чем то особенным, неординарным, тем, что люди еще не видели или видели в одной-двух картах. а у вас что? таверна? хоспаде, да даже ланд давно уже надо делать через хайрес если на стандарте не выкручиваете планку. спросите у себя, что у вас есть то, чего нет нигде, что у вас есть из оригинальных идей? инновационного геймплея?
» WarCraft 3 / Способности и алгоритмы на заказ
» WarCraft 3 / Способности и алгоритмы на заказ
» WarCraft 3 / Почему сбивается цикл?
» WarCraft 3 / Способности и алгоритмы на заказ
Ред. Hate
» WarCraft 3 / Способности и алгоритмы на заказ
Ред. Hate
» WarCraft 3 / Способности и алгоритмы на заказ
» WarCraft 3 / Нетриггерные муки с разносом абилок по уровням
» WarCraft 3 / Русификатор триггеров для JNGP
» WarCraft 3 / Русификатор триггеров для JNGP
» WarCraft 3 / Русификатор триггеров для JNGP
» God's word: The True Way / God's word: The True Way
» WarCraft 3 / Пак планет
Ред. Hate
» WarCraft 3 / Триггерное нанесение урона только врагам
» WarCraft 3 / Как приклепить камеру к юниту как в вов
» WarCraft 3 / Пак планет
» WarCraft 3 / Респавн Мобов
Ред. Hate
» WarCraft 3 / Респавн Мобов
» WarCraft 3 / Респавн Мобов
» WarCraft 3 / ИИ конкретных боссов и прочие тонкости
» WarCraft 3 / Нужна модель? - Вам сюда!
» Администрация XGM / Как удалить аккаунт с сайта
» Оборона Рощи/Defense of the Grove / Анонс Демо-Версии
» Оборона Рощи/Defense of the Grove / Анонс Демо-Версии
» Оборона Рощи/Defense of the Grove / Анонс Демо-Версии