HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Stand Animation Problem solved!

04-07-2003, 08:02 PM#1
Buster
Hi guys!

Use JASS (Custom Text) and take that function:

call SetUnitAnimationByIndex ( unit whichUnit, integer AnimationIndex )

With that function, all animations work, also the STAND animations.:D The only problem is, you have to find out the unit animation index. It goes from 0 till ...

I found that function in common.j and it works great!:D

~Buster
04-07-2003, 08:22 PM#2
Nuladion
Quote:
Originally posted by Buster
Hi guys!

Use JASS (Custom Text) and take that function:

call SetUnitAnimationByIndex ( unit whichUnit, integer AnimationIndex )

With that function, all animations work, also the STAND animations.:D The only problem is, you have to find out the unit animation index. It goes from 0 till ...

I found that function in common.j and it works great!:D

~Buster


how can I find out the index then? is it the same for every unit (all units have stand animation 1 = animation index 1?) or is it different with every unit?

Anway, thanks for posting! This sure is VERY helpful!!!!!

-- Nuladion --
04-07-2003, 11:28 PM#3
Guest
make the play animation in the gui with the animation you want. then convert it to jass. it will show you the number...then turn it into the jass code that buster said
04-08-2003, 05:28 AM#4
FireAarro
i think...

click on a unit in the palette after starting WE and teh first animation you see is 0

press right and you get one

press right again and you get 2

etc.
04-08-2003, 12:00 PM#5
Buster
Hi guys!

I've just made a "Unit's Animation Index Browser" to determine the unit's animation index for that function "SetUnitAnimationByIndex". Hf!:D

This is only made for human units but you can replace these units with undead or nightelf or orc units.

More information in loading screen!

~Buster
04-08-2003, 04:14 PM#6
Nuladion
you're my hero Buster :D
04-08-2003, 11:58 PM#7
Shooter02
Wow awsome job
P.S. to the mods add this to the uber tool!
02-28-2005, 06:11 PM#8
Guest
What do you mean by call SetUnitAnimationByIndex ( unit whichUnit, integer AnimationIndex )

i put that exact code in and it gives me errors. do i have to replace something in that code? like "whichunit", do i replace that text with the units name? (i know little to nothing of jass)

i'm tryng to get a Peon to do a "Stand Hit" animation when he casts an ability. How would i phrase it exactly.. calling on the index and all and using that command above? here is what i came up with using what you've said..


Code:
PeonAnimation
    Events
        Unit - A unit Begins channeling an ability
    Conditions
        (Ability being cast) Equal to Leash 
    Actions
        Custom script:   call SetUnitAnimationByIndex ( unit whichUnit, integer AnimationIndex )
        Animation - Play (Casting unit)'s stand hit animation
 


that's exact copy of what i've tried.

i really need to learn how this works.

also, is it possible to call on these 'indexes" in the object editor for animation names for different abilities? because currenly it's limited without indexes.. can only do certain animations.
03-01-2005, 01:53 AM#9
ForgottenLight
Quote:
Originally Posted by Buster
Hi guys!

Use JASS (Custom Text) and take that function:

call SetUnitAnimationByIndex ( unit whichUnit, integer AnimationIndex )

With that function, all animations work, also the STAND animations.:D The only problem is, you have to find out the unit animation index. It goes from 0 till ...

I found that function in common.j and it works great!:D

~Buster

I assume this is used like:

call SetUnitAnimationByIndex (Peasant_0010, 5)
to play the fivth animation in that unit's list, but how does the syntax for the unit work? (I'm sure what I put in my example is wrong).

Brash, for that animation you don't even need this, this is for if you, say, want to play Stand -3 and not any other stand.
03-01-2005, 03:29 PM#10
Guest
Quote:
Originally Posted by ForgottenLight
I assume this is used like:

call SetUnitAnimationByIndex (Peasant_0010, 5)
to play the fivth animation in that unit's list, but how does the syntax for the unit work? (I'm sure what I put in my example is wrong).

Brash, for that animation you don't even need this, this is for if you, say, want to play Stand -3 and not any other stand.


yeah i know. i just grabbed at that one for example quick. i think "stand hit" is actually a rare animation.. i couldn't seem to call on it using regular gui..

but i did need to know this for other animations for other units that were rare.

and i tried what you said and it works! thanks!

here's example of one that plays rare. they all work now!

Code:
CastSpell
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Raise Dead 
    Actions
        Custom script:   call SetUnitAnimationByIndex( GetSpellAbilityUnit(), 14 )


this is targeting a generic-caster-unit.


ONE MORE QUESTION! How do you loop this??
03-04-2005, 05:57 AM#11
Alfred
Don't resurrect old threads, is it so hard to make a thread of your own to ask a question? Fool.