wraithseeker
Tired.
- Reaction score
- 122
I could try to make them for you guys but that will be counted as, thread stealing .
Hellfire
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Hellfire
Actions
-------- Check the ability condition above this comment --------
Set Points[1] = (Position of (Triggering unit))
-------- Check this dummy unit so it's the correct one. --------
Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at Points[1] facing (Facing of (Triggering unit)) degrees
Set Points[2] = (Target point of ability being cast)
Unit - Make (Triggering unit) face (Angle from Points[1] to Points[2]) over 0.00 seconds
-------- Check this dummy ability. --------
Unit - Add Hellfire Dummy - Damage to (Last created unit)
Unit - Order (Last created unit) to Undead Crypt Lord - Impale Points[2]
Custom script: call RemoveLocation(udg_Points[1])
Custom script: call RemoveLocation(udg_Points[2])
Unit - Pause (Triggering unit)
Wait 1.00 game-time seconds
Unit - Unpause (Triggering unit)
Set Points[1] = (Position of (Triggering unit))
-------- Check this dummy unit. --------
Unit - Create 1 Hellfire Dummy for (Owner of (Triggering unit)) at Points[1] facing (Facing of (Triggering unit)) degrees
Custom script: call RemoveLocation(udg_Points[1])
scope Charge initializer Lightning
//! runtextmacro HAIL_CreateProperty ("Data", "integer", "private")
globals
private constant integer DummyID = 039;u001039; //Raw code of the dummy unit.
private constant integer DummyRaw = 039;A004039; //Raw code of the dummy's dummy ability.
private constant integer raw = 039;A003039; //Raw code of the ability.
private constant integer MaxRange = 1000 //Maximum casting range.
private constant integer MinRange = 250 //Minimum casting range.
private constant integer Offset = 20 //How far the unit moves every interval.
private constant integer Impact = 250 //Distance from the units when they collide.
private constant integer AnimationSpeed = 200 //The animation speed of the unit while charging. The value is in percent.
private constant real speed = 0.03 //Interval of how often the slide function runs.
private constant string Effect1 = "Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile_mini.mdl" //Effect one.
private constant string Effect2 = "Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile_mini.mdl" //Effect two.
private constant string Attatchment1 = "hand,left" //First attatchment.
private constant string Attatchment2 = "hand,right"//Second attatchment.
private constant boolean Paused = false //Choose if the unit should be paused or not during the charge.
endglobals
private struct TestStruct
real angle
timer Timer
unit caster
unit target
real tx
real ty
effect effect1
effect effect2
endstruct
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == raw
endfunction
private function ASlide takes nothing returns nothing
local TestStruct data = GetData (GetExpiredTimer ())
local unit target = data.target
local unit caster = data.caster
local real x = GetUnitX(caster)
local real y = GetUnitY(caster)
local real x2 = GetUnitX(target)
local real y2 = GetUnitY(target)
local real angle = Atan2(y2-y,x2-x)
local real x3 = x + Offset * Cos(angle)
local real y3 = y + Offset * Sin(angle)
local real distance = SquareRoot( (x2-x)*(x2-x) + (y2-y)*(y2-y) )
local unit dummy
call SetUnitX(caster,x3)
call SetUnitY(caster,y3)
call SetUnitAnimationByIndex(caster,6)
if distance <= Impact then
call SetUnitTimeScalePercent(caster,100)
call DestroyEffect(data.effect1)
call DestroyEffect(data.effect2)
set dummy = CreateUnit(GetOwningPlayer(caster),DummyID,x3,y3,0)
call UnitApplyTimedLife(dummy,039;btlf039;,2)
call UnitAddAbility(dummy,DummyRaw)
call IssueTargetOrder(dummy,"thunderbolt",target)
call PauseTimer (data.Timer)
call ResetData (data.Timer)
call DestroyTimer (data.Timer)
call data.destroy ()
set dummy = null
if Paused == true then
call PauseUnit(caster,false)
endif
endif
endfunction
private function Actions takes nothing returns nothing
local TestStruct data = TestStruct.create ()
local real x = GetUnitX(GetTriggerUnit())
local real y = GetUnitY(GetTriggerUnit())
local real angle = 0
local location loc = GetUnitLoc(GetTriggerUnit())
local location loc2 = GetUnitLoc(GetSpellTargetUnit())
local real distance = DistanceBetweenPoints(loc,loc2)
local sound SimError = CreateSoundFromLabel( "InterfaceError",false,false,false,10,10)
if (distance <= MaxRange) and (distance >= MinRange) then
if Paused == true then
call PauseUnit(GetTriggerUnit(),true)
endif
call SetUnitTimeScalePercent(GetTriggerUnit(),AnimationSpeed)
set angle = AngleBetweenPoints(loc,loc2)
set data.angle = angle
set data.Timer = CreateTimer()
call TimerStart (data.Timer,speed,true, function ASlide)
call SetData (data.Timer, data)
set data.caster = GetTriggerUnit()
set data.target = GetSpellTargetUnit()
set data.effect1 = AddSpecialEffectTarget(Effect1,GetTriggerUnit(),Attatchment1)
set data.effect2 = AddSpecialEffectTarget(Effect2,GetTriggerUnit(),Attatchment2)
else
call IssueImmediateOrder(GetTriggerUnit(),"stop")
if (distance >= MaxRange) then
call DisplayTimedTextToPlayer(GetOwningPlayer(GetTriggerUnit()), 0.52, -1.00, 2.00, "|cffffcc00"+"Too far away"+"|r" )
else
call DisplayTimedTextToPlayer(GetOwningPlayer(GetTriggerUnit()), 0.52, -1.00, 2.00, "|cffffcc00"+"Too close"+"|r" )
endif
call StartSound(SimError )
endif
call RemoveLocation(loc)
call RemoveLocation(loc2)
endfunction
//===========================================================================
private function SafeFilt takes nothing returns boolean
return true
endfunction
private function Lightning takes nothing returns nothing
local trigger trig = CreateTrigger()
local integer i = 0
loop
exitwhen i > 15
call TriggerRegisterPlayerUnitEvent(trig,Player(i),EVENT_PLAYER_UNIT_SPELL_EFFECT,Condition(function SafeFilt))
set i = i + 1
endloop
call TriggerAddCondition (trig, Condition (function Conditions ) )
call TriggerAddAction (trig, function Actions )
set trig = null
endfunction
endscope
One thing I need to know though, what exactly do you mean by "from the other side of clock"? Please explain the effects and how you should hit the enemies a little more detailed.