Каковы отношения между ночными эльфами и тауренами во время RoC-TFT? Есть ли книги которые касаются этой темы? Я помню что во время Cataclysm упоминают собрание друидов, включающих обе стороны. Что-то помимо?
Короткий ответ, нет. Такой функции не предусмотрено.
В своих роликах я решил это так. Начинаю проигрывать анимацию по индексу на максимальной скорости. С помощью таймера через отрезок времени продолжаю проигрывать анимацию уже на нормальной скорости. Зная анимацию можно посчитать сколько времени нужно указать таймеру чтобы анимация достигла нужного места. Таким образом игроку будет казаться что анимация проигрывается с какого-то места.
Другой способ это изменить модель. Создать новую анимацию и скопировать или переиспользовать кадры.
Если задание просто создать, то оно даже не появится в списке. Нужно использовать QuestSetDiscovered/QuestSetCompleted/QuestSetFailed чтобы оно появилось.
QuestSetEnabled никогда не пользовался. Можете протестировать и рассказать.
Это ошибка в JNGP. Зависит от способа установки. Попробуйте пересохранить карту и протестировать после этого. Если не поможет, разместите файл карты в папке Maps, запустите игру, найдите карту в списке и проверьте так.
Название: Блуждающая звезда Метод: GUI MUI: Не обязательно Цель: Область Количество уровней: 2 Описание: От кастера к юниту-цели движется даммик, потом когда до юнита-цели остается "X" расстояние - даммик начинает вокруг юнита-цель двигаться случайным образом в "X" радиусе и раз в "Х" секунд он резко двигался и проходил сквозь юнита-цель. Потом через "Х" секунд заклинание кончается и даммик - умирает. Технические характеристики: Желательно что бы скорость перемещения даммика так или иначе можно было редактировать. И маленькая приписка что и где. Знаю заказ достаточно сложный тем более на GUI; прошу сделать то что получится.
// By Zahanc. Version 1. 2017-01-25.
library WanderingStarSpell initializer WanderingStarSpellInit
globals
// Meta settings
public constant integer WANDERING_STAR_SPELL_ID = 'A000'
public constant integer WANDERING_STAR_DUMMY_ID = 'n000'
public constant string WANDERING_STAR_MISSILE_EFFECT_NAME = "Abilities\\Weapons\\DragonHawkMissile\\DragonHawkMissile.mdl"
public constant string WANDERING_STAR_IMPACT_EFFECT_NAME = "Abilities\\Weapons\\DragonHawkMissile\\DragonHawkMissile.mdl"
// End meta settings
// Spell parameters
private constant real missileSpeed = 1000.0
private constant real missileSpeedWhenBouncing = missileSpeed * 3
private constant real bouncingRange = 50.0
private constant real bounceOffDistance = 500.0
private constant real baseDurationSeconds = 5.0
private constant real durationIncreasePerSpellLevel = 1.0
private constant real baseDamagePerBounce = 20.0
private constant real damageIncreasePerSpellLevel = 20.0
private constant integer baseBouncesNumber = 3
private constant integer bouncesNumberIncreasePerSpellLevel = 2
// End spell parameters
// Core variables
private constant real UPDATE_LOOP_TIMER_TIMEOUT = 0.02
private SpellEffect array spellEffects
private integer spellEffectsAmount = 0
// End core variables
endglobals
struct SpellEffect
public unit caster = null
public unit target = null
public integer spellLevel = 1
private static constant integer MODE_FOLLOW = 1
private static constant integer MODE_BOUNCE = 2
private integer mode = SpellEffect.MODE_FOLLOW
public effect missileEffect = null
public unit missile = null
private integer bounces = 0
private location bounceOffLoc = null
public method update takes nothing returns nothing
local real x0 = GetUnitX(this.missile)
local real y0 = GetUnitY(this.missile)
local real z0 = GetUnitFlyHeight(this.missile)
local real x1 = 0.0
local real y1 = 0.0
local real z1 = 0.0
local real x = 0.0
local real y = 0.0
local real z = 0.0
local real vectorMagnitude = 0.0
local real f = 0.0
local real damage = 0.0
if IsUnitDeadBJ(this.target) then
call this.destroy()
return
endif
if SpellEffect.MODE_FOLLOW == this.mode then
set x1 = GetUnitX(this.target)
set y1 = GetUnitY(this.target)
set z1 = GetUnitFlyHeight(this.target)
elseif SpellEffect.MODE_BOUNCE == this.mode then
set x1 = GetLocationX(this.bounceOffLoc)
set y1 = GetLocationY(this.bounceOffLoc)
set z1 = GetLocationZ(this.bounceOffLoc)
endif
set vectorMagnitude = SquareRoot((x1-x0)*(x1-x0)+(y1-y0)*(y1-y0)+(z1-z0)*(z1-z0))
set x = x0 + ((x1 - x0) / vectorMagnitude) * missileSpeed * UPDATE_LOOP_TIMER_TIMEOUT
set y = y0 + ((y1 - y0) / vectorMagnitude) * missileSpeed * UPDATE_LOOP_TIMER_TIMEOUT
set z = z0 + ((z1 - z0) / vectorMagnitude) * missileSpeed * UPDATE_LOOP_TIMER_TIMEOUT
set f = bj_RADTODEG * Atan2(y1 - y0, x1 - x0)
call SetUnitX(this.missile, x)
call SetUnitY(this.missile, y)
call SetUnitFlyHeight(this.missile, z, 0.0)
call SetUnitFacing(this.missile, f)
// Do not count height when calculating collision.
if SquareRoot((x1-x)*(x1-x)+(y1-y)*(y1-y)) <= bouncingRange and SpellEffect.MODE_FOLLOW == this.mode then
set this.mode = SpellEffect.MODE_BOUNCE
// FORMULA FOR DAMAGE CALCULATION
set damage = baseDamagePerBounce + damageIncreasePerSpellLevel * I2R(this.spellLevel)
call UnitDamageTarget(this.caster, this.target, damage, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL, WEAPON_TYPE_WHOKNOWS)
call DestroyEffect(AddSpecialEffect(WANDERING_STAR_IMPACT_EFFECT_NAME, x1, y1))
call RemoveLocation(this.bounceOffLoc)
// Use `location` to ensure the result is in game map bounds.
set this.bounceOffLoc = Location(GetRandomReal(x1 - bounceOffDistance, x1 + bounceOffDistance), GetRandomReal(y1 - bounceOffDistance, y1 + bounceOffDistance))
set this.bounces = this.bounces + 1
elseif SquareRoot((x1-x)*(x1-x)+(y1-y)*(y1-y)) <= bouncingRange and SpellEffect.MODE_BOUNCE == this.mode then
set this.mode = SpellEffect.MODE_FOLLOW
call RemoveLocation(this.bounceOffLoc)
set this.bounceOffLoc = null
endif
// FORMULA FOR BOUNCES AMOUNT CALCULATION
if this.bounces >= baseBouncesNumber + bouncesNumberIncreasePerSpellLevel * this.spellLevel then
call this.destroy()
endif
endmethod
method onDestroy takes nothing returns nothing
local integer i = 0
set this.caster = null
set this.target = null
call DestroyEffect(this.missileEffect)
set this.missileEffect = null
call RemoveUnit(this.missile)
set this.missile = null
call RemoveLocation(this.bounceOffLoc)
set this.bounceOffLoc = null
loop
exitwhen i >= spellEffectsAmount
if this == spellEffects[i] then
set spellEffectsAmount = spellEffectsAmount - 1
set spellEffects[i] = spellEffects[spellEffectsAmount]
set spellEffects[spellEffectsAmount] = 0
return
endif
set i = i + 1
endloop
endmethod
endstruct
function CreateWanderingStarSpellEffect takes unit caster, unit target, integer spellLevel returns nothing
local SpellEffect spellEffect = SpellEffect.create()
set spellEffect.caster = caster
set spellEffect.target = target
set spellEffect.missile = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), WANDERING_STAR_DUMMY_ID, GetUnitX(caster), GetUnitY(caster), GetUnitFacing(caster))
call UnitAddAbility(spellEffect.missile, 'Avul')
call UnitAddAbility(spellEffect.missile, 'Aloc')
call UnitAddAbility(spellEffect.missile, 'Amrf')
set spellEffect.missileEffect = AddSpecialEffectTarget(WANDERING_STAR_MISSILE_EFFECT_NAME, spellEffect.missile, "origin")
set spellEffects[spellEffectsAmount] = spellEffect
set spellEffectsAmount = spellEffectsAmount + 1
endfunction
function SpellUpdateLoopCallback takes nothing returns nothing
local integer i = 0
local SpellEffect next = 0
loop
exitwhen i >= spellEffectsAmount
set next = spellEffects[i]
call next.update()
set i = i + 1
endloop
endfunction
function OnSpellEffectPredicate takes nothing returns boolean
return WANDERING_STAR_SPELL_ID == GetSpellAbilityId()
endfunction
function OnSpellEffect takes nothing returns nothing
call CreateWanderingStarSpellEffect(GetSpellAbilityUnit(), GetSpellTargetUnit(), GetUnitAbilityLevel(GetSpellAbilityUnit(), WANDERING_STAR_SPELL_ID))
endfunction
function WanderingStarSpellInit takes nothing returns nothing
local trigger t = CreateTrigger( )
call TimerStart(CreateTimer(), UPDATE_LOOP_TIMER_TIMEOUT, true, function SpellUpdateLoopCallback)
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t, Condition( function OnSpellEffectPredicate))
call TriggerAddAction(t, function OnSpellEffect)
set t = null
endfunction
endlibrary
MUI. Все настройки находятся в блоке глобальных переменных. Назначение каждого параметра должно быть понятно по названию.
Снаряд отскакивает только по горизонтали. Из-за того что расстояние на которое снаряд отскакивает случайное, количество урона на еденицу времени различается между применениями.
Я использую импортную модель подставного юнита, чтобы менять модель эффекта в коде а не в РО. Это позволяет иметь лишь один тип подставного юнита на все заклинания.
Наконец получил формальную оценку от Hiveworkshop. Грустная оценка, честно говоря. Однако пользователи отзываются гораздо лучше, что важнее для меня. Собираюсь обновить кампанию в течении недели.
Я тоже удивлён тем что кампания кажется людям лёгкой. Признаю, что мне недостало терпения пройти даже первую главу на развитие честно. Враги слишком выносливы. В тоже время нет интересных способностей. Таким образом мне скоро надоело играть. Даже при том что я играл на лёгком или среднем уровне сложности.
Rescues a unit for a player. This performs the default rescue behavior, including a rescue sound, flashing selection circle, ownership change, and optionally a unit color change.
function RescueUnitBJ takes unit whichUnit, player rescuer, boolean changeColor returns nothing
if IsUnitDeadBJ(whichUnit) or (GetOwningPlayer(whichUnit) == rescuer) then
return
endif
» WarCraft 3 / Вселенная WarCraft
» WarCraft 3 / Больше одного героя (одного типа).
+
» WarCraft 3 / Анимация юнита
» WarCraft 3 / Анимация юнита
» WarCraft 3 / Анимация юнита
» WarCraft 3 / задание для одного игрока
» Way of Others / Way of Others
» WarCraft 3 / Способности и алгоритмы на заказ
» WarCraft 3 / Способности и алгоритмы на заказ
» WarCraft 3 / Способности и алгоритмы на заказ
» WarCraft 3 / Модели в разработке (WIP)
» Мастерская Психа / Древние захоронение часть 1
Откуда колонны, кстати? Ищу новые декорации для своего храма Древних богов.
Ред. Zahanc
» WarCraft 3 / Способности и алгоритмы на заказ
» WarCraft 3 / задание для одного игрока
» WarCraft 3 / Способности и алгоритмы на заказ
» WarCraft 3 / Способности и алгоритмы на заказ
» WarCraft 3 / задание для одного игрока
» Повелитель Бездны / Повелитель Бездны
» Повелитель Бездны / Повелитель Бездны
Ред. Zahanc
» WarCraft 3 / Высота Z
z = RMinBJ(z - (targetZ - z) * timeout, targetZ)
elseif z < targetZ then
z = RMaxBJ(z + (targetZ - z) * timeout, targetZ)
endif
+
Обновил. Заменил статичное число.
» WarCraft 3 / Высота Z
» WarCraft 3 / Высота Z
Sergey105,
Sergey105: Таймер.
» Мастерская переводов | Кампании WC3 на русском / Война Разложения
» WarCraft 3 / как сделать так что бы при приближении к юниту он поменял владел
including a rescue sound, flashing selection circle, ownership change,
and optionally a unit color change.
function RescueUnitBJ takes unit whichUnit, player rescuer, boolean changeColor returns nothing
if IsUnitDeadBJ(whichUnit) or (GetOwningPlayer(whichUnit) == rescuer) then
return
endif
call SetUnitOwner(whichUnit, rescuer, changeColor)
call UnitAddIndicator(whichUnit, 0, 255, 0, 255)
call PingMinimapForPlayer(rescuer, GetUnitX(whichUnit), GetUnitY(whichUnit), bj_RESCUE_PING_TIME)
endfunction
» Мастерская Психа / Arena :2018: