Developer's Blog
Register Low Fi Mark Forums Read

Reply
 
Thread Tools
Old 08-09-2010, 08:43 AM   #1
Terresquall
Member
 
Terresquall's Avatar
 
Join Date: Jun 2009
Posts: 314
Blog Entries: 2
Terresquall is offline

Default [FIX][ANIMATION] Shadow Wave (Edited 03/09/10)


EDIT: Replaced the Freezing Breath effect in the suggestion with the original one, as the Freezing Breath effect is used by Io's Wisps.

EDIT: Changed some errors in the description of the effect and added more details about the coding for the spell.

Introduction

Shadow Wave looks incredibly weird now. While it is a wave that is said to bounce around units, when it is cast you instantly see a few beams link several units together and disappear abruptly. The spell also dissipates damage onto surrounding units, but no indication of this damage is shown on affected units.

This suggestion seeks to change the whole visual working of this spell to make it more congruent and visually appealing.

The Beams

Primarily, the beams have to be changed to become more like hardcoded chain spells in the game (i.e. Healing Wave, Chain Lightning), where there are intervals between the bounces, and the beams fade away over time instead of abruptly disappearing.
  • Instead of the spell taking effect simultaneously on all affected units at once, let there be a 0.2 second delay between each bounce.
  • Make the beam last for 0.7 second, then fade out over the next 0.5 second for a total time of 1.2 seconds.
  • Make the beam float at a height of 85 above the ground for both units instead of being on the ground.

For ease of use, I've attached the function I created to help me easily spawn lightning effects between units with fade effects. Refer below for the function.
Jass:
// ********************************************************
// ** CreateLightningOnUnits function by Terresquall
// **
// ** There are two functions in this file. Do NOT use the fif_CreateLightningOnUnits
// ** function. Use the CreateLightningOnUnits function that you will find by scrolling
// ** down.
// **
// ********************************************************

function fif_CreateLightningOnUnits takes nothing returns nothing
    local timer t = GetExpiredTimer()
    local integer s = GetHandleId(t)
    local hashtable gc = udg_HashCache
    local lightning l = LoadLightningHandle(gc,s,1)
    local real life = LoadReal(gc,s,3)
    local real ad = LoadReal(gc,s,2)
    local real totalLife = LoadReal(gc,s,4)
    local unit u = LoadUnitHandle(gc,s,5)
    local unit targ = LoadUnitHandle(gc,s,6)
    local real time = LoadReal(gc,s,8)+.04
    local location ul = GetUnitLoc(u)
    local location targl = GetUnitLoc(targ)
    local real x = GetUnitX(u)
    local real y = GetUnitY(u)
    local real z = GetUnitFlyHeight(u)+LoadReal(gc,s,7)
    local real x2 = GetUnitX(targ)
    local real y2 = GetUnitY(targ)
    local real z2 = GetUnitFlyHeight(targ)+85
    local real l1 = GetLocationZ(ul)
    local real l2 = GetLocationZ(targl)
    local real alpha
    call MoveLightningEx(l,true,x,y,z+l1,x2,y2,z2+l2)
    call SaveReal(gc,s,8,time)
    if time > life then
        set alpha = GetLightningColorA(l)-ad
        if alpha < 0 then
            set alpha = 0
        endif
        call SetLightningColor(l,GetLightningColorR(l),GetLightningColorG(l),GetLightningColorB(l),alpha)
        if time > totalLife then
            call DestroyLightning(l)
            call KillTimer(t)
            call FlushChildHashtable(gc,s)
        endif
    endif
    call RemoveLocation(ul)
    call RemoveLocation(targl)
    set ul = null
    set targl = null
    set u = null
    set targ = null
    set t = null
    set gc = null
    set l = null
endfunction    

function CreateLightningOnUnits takes string codeName, unit u, unit targ, real zOffset, real r, real g, real b, real alpha, real life, real fadeTime returns nothing
    local lightning l
    local timer t = CreateTimer()
    local integer s = GetHandleId(t)
    local hashtable gc = udg_HashCache
    local real x = GetUnitX(u)
    local real y = GetUnitY(u)
    local real z = GetUnitFlyHeight(u)+zOffset
    local real x2 = GetUnitX(targ)
    local real y2 = GetUnitY(targ)
    local real z2 = GetUnitFlyHeight(targ)+85
    local location ul = GetUnitLoc(u)
    local location targl = GetUnitLoc(targ)
    local real l1 = GetLocationZ(ul)
    local real l2 = GetLocationZ(targl)
    local real ad = alpha/(fadeTime/.04)
    set l = AddLightningEx(codeName,true,x,y,z+l1,x2,y2,z2+l2)
    call SetLightningColor(l,r,g,b,alpha)
    call TimerStart(t,.04,true,function fif_CreateLightningOnUnits)
    call SaveLightningHandle(gc,s,1,l)
    call SaveReal(gc,s,2,ad)
    call SaveReal(gc,s,3,life)
    call SaveReal(gc,s,4,life+fadeTime)
    call SaveUnitHandle(gc,s,5,u)
    call SaveUnitHandle(gc,s,6,targ)
    call SaveReal(gc,s,7,zOffset)
    call RemoveLocation(ul)
    call RemoveLocation(targl)
    set ul = null
    set targl = null
    set l = null
    set gc = null
    set t = null
endfunction

Below are the values I've used in my function to create the lightning effect seen in my map (its basically everything on the bullet points, in code form).

Code:
CreateLightningOnUnits("SPLK",targ,p,85,.3,.5,1,1,.7,.5)
Effect On Units



Right now, only a feeble, semi-visible blue wave (shared by QoP's Scream of Pain) emanates from the unit's origin when it is healed by the wave. I'm adding several engine effects onto the units affected to show the spell's effects clearer. The pictures above show these effects.
  • Play the death animation of Abilities\\Spells\\Undead\\FrostArmor\\FrostArmorT arget.mdl on every healed unit's chest.
  • Play the death animation of Abilities\\Spells\\Undead\\FreezingBreath\\Freezin gBreathMissile.mdl on every healed unit's origin. This depicts that the heal has AoE qualities, and are the circles underneath the units in the picture. As the Freezing Breath effect is used by Io's Wisps, keep the current AoE dissipation effect (Abilities\\Spells\\Undead\\ReplenishMana\\Replenis hManaCaster.mdl) that plays near the feet of units healed by the spell (but preferrably play it on a unit's location instead of attaching it to a unit's origin).
  • Play the sound Abilities\\Weapons\\DemonHunterMissile\\DemonHunte rMissileHit2.wav at 1.2 pitch on all healed units.
  • Play the death animation of Abilities\\Weapons\\LichMissile\\LichMissile.mdl on all units damaged by the spell. The second picture shows this clearly on the Footman.
All these additions make the spell more complete and feel more potent.

Testmap

Check the spell out in action here. As usual, it looks alot better in practice than the pictures show. Note that you can pick multiple heroes in the map (so you have targets for Shadow Wave to bounce to).

Miscellaneous

I understand that adding a delay to the spell is a slight mechanical change, but the standpoint from which I approach this change is from a visual standpoint. It just looks more logical like that.

Moreover, I believe that a 0.2 second delay in each wave won't make much of a difference in real gameplay. How often would a split-second's delay in healing about 100 HP make the difference between life and death? Not very much, I'd say.
  Reply With Quote
Last edited by Terresquall; 10-28-2010 at 08:20 AM.
Old 08-09-2010, 08:45 AM   #2
[P]rokatdn
Member
 
[P]rokatdn's Avatar
 
Join Date: Nov 2009
Location: Việt Nam
Posts: 1,834
Blog Entries: 1
[P]rokatdn is online now
Default Re: [FIX][ANIMATION] Shadow Wave

Terresquall's thread, instant T-Up .
__________________
  Reply With Quote
Old 08-09-2010, 11:11 AM   #3
Terresquall
Member
 
Terresquall's Avatar
 
Join Date: Jun 2009
Posts: 314
Blog Entries: 2
Terresquall is offline
Default Re: [FIX][ANIMATION] Shadow Wave

Ah thanks prokatdn
  Reply With Quote
Old 08-09-2010, 11:27 AM   #4
ZΣD
Member
 
ZΣD's Avatar
 
Join Date: Jun 2009
Posts: 846
ZΣD is offline
Default Re: [FIX][ANIMATION] Shadow Wave

T-up ofc, looks much better
I hope Ice consider it ever been ._.
__________________
Just try an' stop me!
  Reply With Quote
Old 08-09-2010, 11:28 AM   #5
thoby123
Member
 
thoby123's Avatar
 
Join Date: Jun 2009
Posts: 913
Blog Entries: 1
Guide Writer Award 
thoby123 is offline
Default Re: [FIX][ANIMATION] Shadow Wave

Quote:
Originally Posted by Terresquall View Post
Ah thanks prokatdn
i see wat u did thar

But another excellent suggestion, so thumbs high!
__________________
Bottle fame, brew glory- A guide to the underloved, underestimated Alchemist. Now comes in semi-Premium quality!
Currently trapped in study limbo, spastic activity for now
SUGGESTIONS: Give Lich jazzhands! Alchie needs a new Greed! Pit o' Malice needs more pizzaz! Flesh Golem/Tombstone makeover anyone? Upgrade Complete! Newbie-friendly commands! Make BH's Wind Walk synergise! Make Gnoll a Gnoll!
IMPLEMENTED: Give Dirge some real disease!
  Reply With Quote
Old 08-09-2010, 11:42 AM   #6
dominator02
Member
 
dominator02's Avatar
 
Join Date: Sep 2009
Location: Philippines
Posts: 7,764
dominator02 is online now
Default Re: [FIX][ANIMATION] Shadow Wave

__________________


  Reply With Quote
Old 08-09-2010, 11:47 AM   #7
Raxet
Member
 
Raxet's Avatar
 
Join Date: Jul 2009
Location: Bulgaria
Posts: 874
Raxet is offline
Default Re: [FIX][ANIMATION] Shadow Wave

You are a WinRar man a MF WinRar.
  Reply With Quote
Old 08-09-2010, 11:56 AM   #8
Ignis
Graphics Crew
 
Ignis's Avatar
 
Join Date: Jun 2009
Location: Bulgaria
Posts: 1,537
Blog Entries: 10
Ignis is offline
Default Re: [FIX][ANIMATION] Shadow Wave

t-up, this has been bugging me too
__________________

Nerd? We prefer the term "intellectual bad ass."
  Reply With Quote
Old 08-09-2010, 11:57 AM   #9
Shadow Fury
Banned
 
Join Date: Apr 2010
Location: Draining Your Life Juice.
Posts: 10,204
Blog Entries: 2
Send a message via MSN to Shadow Fury
Shadow Fury is offline
Default Re: [FIX][ANIMATION] Shadow Wave

A hesitant T-Up. I like the instant healing.
  Reply With Quote
Old 08-09-2010, 12:02 PM   #10
Tomarzig
Member
 
Tomarzig's Avatar
 
Join Date: Sep 2009
Location: Thailand
Posts: 928
Tomarzig is offline
Default Re: [FIX][ANIMATION] Shadow Wave

T-Up
__________________
Predictions For The Next Hero
Chaos Knight, Phantom Assassin and Luna,
  Reply With Quote
Old 08-09-2010, 12:10 PM   #11
CyberTech
Member
 
CyberTech's Avatar
 
Join Date: Jan 2010
Location: 23.62 inches from my monitor
Posts: 740
Blog Entries: 1
Send a message via MSN to CyberTech Send a message via Yahoo to CyberTech Send a message via Skype™ to CyberTech
CyberTech is offline
Default Re: [FIX][ANIMATION] Shadow Wave

1) Is the effect on healed units the same as Io's Spirits' explosion (freezing breath death)?
2) I like the wave fading/delay. Kinda similar to healing wave I suppose.
T-up for the fading/delay wave, but t-down for target effect. For me personally, replenish mana effect looks better (yes it looks blurry, but we can fix that by adding 2-3 effects at once). Also the sound is annoying.
  Reply With Quote
Old 08-09-2010, 12:12 PM   #12
Siraraz
Member
 
Join Date: Jun 2009
Location: Earth
Posts: 1,751
Blog Entries: 4
Siraraz is offline
Default Re: [FIX][ANIMATION] Shadow Wave

Always been annoyed as well. For the lightning, did you use GetLocationZ( loc ) + 100?
  Reply With Quote
Old 08-09-2010, 12:14 PM   #13
Burndead
Member
 
Burndead's Avatar
 
Join Date: Nov 2009
Location: Plovdiv, Bulgaria
Posts: 1,276
Blog Entries: 1
Burndead is offline
Default Re: [FIX][ANIMATION] Shadow Wave

I think that Terresquall should join the Dota staff asap.

Ontopic: It looks really good than the current effect.

T-UP
__________________
  Reply With Quote
Old 08-09-2010, 12:15 PM   #14
CyberTech
Member
 
CyberTech's Avatar
 
Join Date: Jan 2010
Location: 23.62 inches from my monitor
Posts: 740
Blog Entries: 1
Send a message via MSN to CyberTech Send a message via Yahoo to CyberTech Send a message via Skype™ to CyberTech
CyberTech is offline
Default Re: [FIX][ANIMATION] Shadow Wave

Quote:
Originally Posted by Burndead View Post
I think that Terresquall should join the Dota staff asap.

Ontopic: It looks really good than the current effect.

T-UP
They recruit
  Reply With Quote
Old 08-09-2010, 12:16 PM   #15
Terresquall
Member
 
Terresquall's Avatar
 
Join Date: Jun 2009
Posts: 314
Blog Entries: 2
Terresquall is offline
Default Re: [FIX][ANIMATION] Shadow Wave

Quote:
Always been annoyed as well. For the lightning, did you use GetLocationZ( loc ) + 100?
Nope. Sadly there's no GetUnitZ or GetLocationZ in JASS. I used GetTerrainCliffLevel + GetUnitFlyHeight to get the (rough) correct height. GetTerrainCliffLevel isn't completely accurate as it doesn't account for offsets without using AddCliff.

A workaround would be to simply have a dummy unit cast a dummy Chain Lightning spell on every target with the modified beam in Shadow Wave. That would make the height correct as the hardcoded lightning effects are done properly.

I will include the code I used in the topic in awhile.

Quote:
They recruit
I reckon they would have done so if they wanted to. Moreover, given that most of my suggestions involve code, I'm not so sure how much I can help.
  Reply With Quote
Old 08-09-2010, 12:16 PM   #16
WorngSpelling
Member
 
WorngSpelling's Avatar
 
Join Date: Apr 2010
Location: Saint Haven
Posts: 352
Blog Entries: 1
WorngSpelling is offline
Default Re: [FIX][ANIMATION] Shadow Wave

T-up
  Reply With Quote
Old 08-09-2010, 12:21 PM   #17
Siraraz
Member
 
Join Date: Jun 2009
Location: Earth
Posts: 1,751
Blog Entries: 4
Siraraz is offline
Default Re: [FIX][ANIMATION] Shadow Wave

Quote:
Sadly there's no GetUnitZ or GetLocationZ in JASS.
There is a GetLocationZ....

Jass:
GetLocationZ

Look over it
  Reply With Quote
Old 08-09-2010, 12:30 PM   #18
Terresquall
Member
 
Terresquall's Avatar
 
Join Date: Jun 2009
Posts: 314
Blog Entries: 2
Terresquall is offline
Default Re: [FIX][ANIMATION] Shadow Wave

Quote:
There is a GetLocationZ....
I guess you learn something new everyday. Having a GetLocationZ makes things so much easier in terms of programming that damn beam
  Reply With Quote
Old 08-09-2010, 12:55 PM   #19
L|Enzo
Member
 
L|Enzo's Avatar
 
Join Date: Jun 2009
Posts: 1,040
Blog Entries: 4
L|Enzo is offline
Default Re: [FIX][ANIMATION] Shadow Wave

Quote:
Originally Posted by prokatdn View Post
Terresquall's thread, instant T-Up .
+1 me always this..!! ^^
__________________
  Reply With Quote
Old 08-09-2010, 01:03 PM   #20
CyberTech
Member
 
CyberTech's Avatar
 
Join Date: Jan 2010
Location: 23.62 inches from my monitor
Posts: 740
Blog Entries: 1
Send a message via MSN to CyberTech Send a message via Yahoo to CyberTech Send a message via Skype™ to CyberTech
CyberTech is offline
Default Re: [FIX][ANIMATION] Shadow Wave

Quote:
Originally Posted by L|Enzo View Post
+1 me always this..!! ^^
I just t-downed him
  Reply With Quote
Reply
  Defense of the Ancients Suggestions Visuals


Forum Jump

Thread Tools