wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Warcraft III Modding > Developer's Corner > Triggers & Scripts
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 05-06-2009, 12:38 AM   #1
cosmicat
Probably AFK
 
cosmicat's Avatar
 
Join Date: Feb 2009
Posts: 635

cosmicat will become famous soon enough (71)cosmicat will become famous soon enough (71)cosmicat will become famous soon enough (71)

Default [help] [rerun] Playing any unit's "walk" animation

So. I realize this is something like the 15th time this subject has come up here, but the last time was in 2007 and I'm wondering if after nearly 2 years there has been any progress/insight into this particular problem.

Apparently, SetUnitAnimation(u, "walk") fails to play a unit's "walk" animation for any discernible length of time, and the supposed way around this is to use SetUnitAnimationByIndex. Since the index changes depending on the unit model, is there any way to get SetUnitAnimation or QueueUnitAnimation to do its thing?

Here's the spell effect I'm going for: the caster begins channeling "Mesmerize," forcing the target unit to face in the direction of the caster and walk (very) slowly towards the caster. At the moment, this is accomplished with Aerial Shackles (for single-target channeling and disable) and a periodic timer that makes the unit face the caster and moves it with SetPosition.

SetPosition does not, apparently, interrupt animations at all (it only interrupts orders, which usually causes animation interruption if the unit is not disabled somehow).

So what I'm asking for is *any* known workaround that applies to *every* conceivable unit with a Walk animation.
__________________
+++++++++++[>++++++>++++++++++>++++++++++<<<-]>+.>+.++++.+>-.----.------.--.<.
cosmicat is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 05-06-2009, 01:05 AM   #2
moyack
Evil Emoticon
 
moyack's Avatar


Respected User
Project Leader: PoC
 
Join Date: Jan 2006
Posts: 3,278

Submissions (17)

moyack is a splendid one to behold (666)moyack is a splendid one to behold (666)moyack is a splendid one to behold (666)moyack is a splendid one to behold (666)

AI Tournament #2 - 2nd PlaceHero Contest - Second place

Send a message via MSN to moyack
Default

Set the walk animation speed very slow (SetUnitMoveSpeed()) and with the periodic timer (0.25 seconds period could work) order him to walk to the caster.
moyack is offline   Reply With Quote
Old 05-06-2009, 02:48 AM   #3
Kyrbi0
AKA Khyrberos
 
Kyrbi0's Avatar
 
Join Date: May 2008
Posts: 2,943

Submissions (1)

Kyrbi0 is a jewel in the rough (166)Kyrbi0 is a jewel in the rough (166)

Send a message via MSN to Kyrbi0
Default

Quote:
Originally Posted by moyack
Set the walk animation speed very slow (SetUnitMoveSpeed()) and with the periodic timer (0.25 seconds period could work) order him to walk to the caster.
Quote:
Originally Posted by cosmicat
At the moment, this is accomplished with Aerial Shackles (for single-target channeling and disable)
__________________
My Projects, Resources, + Tutorials: ~Just got back from my mission. Glad to be back. Woot! :P~
=It was brought to my attention recently that the ":P" icon stands for "tongue-sticking out", and not the "smirky half-smile" I was using it for all these years. = Thusly I apologize for any unintentional juvenilization of my messages to anyone so afflicted.=
Kyrbi0 is offline   Reply With Quote
Old 05-06-2009, 04:20 AM   #4
cosmicat
Probably AFK
 
cosmicat's Avatar
 
Join Date: Feb 2009
Posts: 635

cosmicat will become famous soon enough (71)cosmicat will become famous soon enough (71)cosmicat will become famous soon enough (71)

Default

First, I'd like to thank you just for trying to help. Mostly just to offset the ungrateful tone I'm inevitably going to end up with. Sorry about that.

While ordering the unit *could* work...
  1. There are a few weird bugs happening when I use Drain Life and Channel
  2. If the unit is actually walking, it's allowed to mess up the spell by casting any instant or uninterruptable spell: Wind Walk, Immolation, Metamorphosis, Storm Crow Form, etc (which shouldn't happen if it's in a trance or something).
  3. Item bonuses can screw with movement speed manipulation, which is an entirely new set of problems that I'd really rather not deal with (especially since the spell already works perfectly as-is).

In all honesty, I think creating a huge if/else chain inside a function would be more feasible than trying to troubleshoot the above three issues. Now, I wouldn't necessarily object to a different approach, but I'd rather not trade one known bug for three unknowns. I hope you understand.
__________________
+++++++++++[>++++++>++++++++++>++++++++++<<<-]>+.>+.++++.+>-.----.------.--.<.
cosmicat is offline   Reply With Quote
Old 05-06-2009, 09:18 AM   #5
grim001
requires vJass
 
grim001's Avatar


Code Moderator
 
Join Date: Nov 2006
Posts: 1,540

Submissions (10)

grim001 is just really nice (277)grim001 is just really nice (277)

Send a message via AIM to grim001
Default

If you are set on being able to play the walk animation of any unit, you can accomplish that by attaching the proper walking index to every unit-type that's used on your map, and using a function like GetUnitWalkIndex. There are probably easier solutions than this, but it would let you do what you want.
grim001 is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 12:01 AM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2017, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services