The SFX is pwn, who wouldn't want to use it
I hardly believe thats a valid excuss, but it is your spell, so i will leave you too it.
And the walk animation I play so that the unit doesn't continue his casting animation.
Wouldn't the "stand" animation be a bit more subtle?
JASS:
private function Stop takes nothing returns nothing
call PauseUnit(GetTriggeringUnit(),true)
call IssueImmediateOrder(GetTriggerUnit(),"stop")
call PauseUnit(GetTriggeringUnit(),false)
call SetUnitAnimation(GetTriggeringUnit(),"stand")
// call SimError(GetOwningPlayer(GetTriggeringUnit(),"This spell is only auto-castable.")
endfunction
And a SimError creates the little yellow writing at the bottom of your screen, saying that something cannot be done, or that there is.. well.. an error . Makes things look very professional.
But as i said before, this is yours, and all in all it is fine, so yeah whatever .
EDIT:
Also:
JASS:
private function DefTRYConditions takes nothing returns boolean
return GetSpellAbilityId() == ability_TVid
endfunction
private function DefTRYActions takes nothing returns nothing
local unit tryU = GetTriggerUnit()
call IssueImmediateOrder(tryU, "holdposition")
call TriggerSleepAction(0.01)
call SetUnitAnimation(tryU, "walk")
set tryU = null
endfunction
private function OffTRYConditions takes nothing returns boolean
return GetSpellAbilityId() == ability_OFFTVid
endfunction
private function OffTRYActions takes nothing returns nothing
local unit OFFTRYU = GetTriggerUnit()
call IssueImmediateOrder(OFFTRYU, "holdposition")
call TriggerSleepAction(0.01)
call SetUnitAnimation(OFFTRYU, "walk")
set OFFTRYU = null
endfunction
The above can be put into one trigger condition, it would save heaps of space and be more efficient.
JASS:
private function OffTRYActions takes nothing returns boolean
local unit OFFTRYU = GetTriggerUnit()
if GetSpellAbilityId() == ability_TVid or GetSpellAbilityId() == ability_OFFTVid then
call PauseUnit(OFFTRYU,true)
call IssueImmediateOrder(OFFTRYU,"stop")
call PauseUnit(OFFTRYU,false)
call SetUnitAnimation(OFFTRYU,"stand")
endif
set OFFTRYU = null
return false
endfunction
I think that would work.