| 02-05-2005, 02:23 AM | #1 |
I want to play the Blademaster's Stand - 4 animation in a spell by putting Stand fourth Stand - 4 Stand, fourth Stand, - 4 Stand, 4 Stand, -, -4 In Art - Animation Names but I have had no success. I can make any animation work with a number on it work but I dont know how to do this. Ive searched the forums but i can't find something that will get this to work. |
| 02-05-2005, 09:54 AM | #2 |
I have tested it with a JASS function named something like play animation per id. It worked for me, at first I made the animation being played one after another to see which id the wanted animation had, then I changed the trigger to play the right animation. |
| 02-07-2005, 01:02 AM | #3 |
I Dont understand can you please tell me how I can do it specifically? |
| 02-07-2005, 07:43 AM | #4 |
cant you just use the trigger animation - play such and such unit's stand 4 animation |
| 02-07-2005, 09:43 AM | #5 |
No... I think that's the whole point... When you call for stand 4 using that method it plays any stand animation. |
| 02-07-2005, 01:58 PM | #6 |
Ok I'll try to explain it accurately: 1.Create a unit of the type you want to play the stand - 4 animation of 2.Create a trigger with an event like time elapsed is 5.00 seconds 3.Add an action to play any animation(doesnt matter which) 4.Convert the trigger to custom text(which can be done using the edit-menu) 5.You'll have a (confusing) after that, try to find something like: Code:
function (your trigger name)_Actions
call SetUnitAnimation( (the unit you set), "the animation you set" )
endfunctionChange "call SetUnitAnimation" to "call SetUnitAnimationByIndex" and "the animation you set" to 1 After that line write another line with the text: call PolledWait(1.00) Then copy those two lines for every animation the unit has and change the 1 in the line beginning with "call SetUnitAnimation" to 2, 3, 4 and so on. Then test the map and look which animation stand - 4 is.(When it is played after 5 seconds, it is the first, when it is played after 6 seconds, the second and so on) 6.Copy the right line with "call SetUnitAnimationByIndex"(where the number is the one of the stand - 4 animation) and add an action to the trigger where you want the animation to be played "custom script". As the script text paste the line you copied. Then delete the other trigger and all should work. |
| 02-28-2005, 04:25 PM | #7 | |
Guest | Quote:
i dont understand. the part where you say "the animation you set" to 1.... what does that mean? you replace the text "Stand" (if that's the animation name you want to use)... by typing "1" ... so that everything will read... Code:
function Trig_UnitAnimation_Actions takes nothing returns nothing
call SetUnitAnimationByIndex( GetSpellAbilityUnit(), "1" )
call PolledWait(1.00)
endfunctionis that how it's written? here is what i got from what you said. im going to look at the animation from a Peon. he has 23 animations. Code:
function Trig_PeonAnimation_Actions takes nothing returns nothing
call SetUnitAnimationByIndex( GetSpellAbilityUnit(), to 1 )
call PolledWait(1.00)
call SetUnitAnimationByIndex( GetSpellAbilityUnit(), to 2 )
call PolledWait(1.00)
call SetUnitAnimationByIndex( GetSpellAbilityUnit(), to 3 )
call PolledWait(1.00)
call SetUnitAnimationByIndex( GetSpellAbilityUnit(), to 4 )
call PolledWait(1.00)
call SetUnitAnimationByIndex( GetSpellAbilityUnit(), to 5 )
call PolledWait(1.00)
call SetUnitAnimationByIndex( GetSpellAbilityUnit(), to 6 )
call PolledWait(1.00)
call SetUnitAnimationByIndex( GetSpellAbilityUnit(), to 7 )
call PolledWait(1.00)
call SetUnitAnimationByIndex( GetSpellAbilityUnit(), to 8 )
call PolledWait(1.00)
call SetUnitAnimationByIndex( GetSpellAbilityUnit(), to 9 )
call PolledWait(1.00)
call SetUnitAnimationByIndex( GetSpellAbilityUnit(), to 10 )
call PolledWait(1.00)
call SetUnitAnimationByIndex( GetSpellAbilityUnit(), to 11 )
call PolledWait(1.00)
call SetUnitAnimationByIndex( GetSpellAbilityUnit(), to 12 )
call PolledWait(1.00)
call SetUnitAnimationByIndex( GetSpellAbilityUnit(), to 13 )
call PolledWait(1.00)
call SetUnitAnimationByIndex( GetSpellAbilityUnit(), to 14 )
call PolledWait(1.00)
call SetUnitAnimationByIndex( GetSpellAbilityUnit(), to 15 )
call PolledWait(1.00)
call SetUnitAnimationByIndex( GetSpellAbilityUnit(), to 16 )
call PolledWait(1.00)
call SetUnitAnimationByIndex( GetSpellAbilityUnit(), to 17 )
call PolledWait(1.00)
call SetUnitAnimationByIndex( GetSpellAbilityUnit(), to 18 )
call PolledWait(1.00)
call SetUnitAnimationByIndex( GetSpellAbilityUnit(), to 19 )
call PolledWait(1.00)
call SetUnitAnimationByIndex( GetSpellAbilityUnit(), to 20 )
call PolledWait(1.00)
call SetUnitAnimationByIndex( GetSpellAbilityUnit(), to 21 )
call PolledWait(1.00)
call SetUnitAnimationByIndex( GetSpellAbilityUnit(), to 22 )
call PolledWait(1.00)
call SetUnitAnimationByIndex( GetSpellAbilityUnit(), to 23 )
call PolledWait(1.00)
endfunctionwhen i try to save, it tells me something is wrong with the code.. so where did i go wrong? ----------------------------- edit: uh i figured it out. call SetUnitAnimationByIndex( GetSpellAbilityUnit(), 23 ) leave out the "to" thanks for the tut. how do you loop these? and how do you use indexes in the Object editor->abilities->abilityname for animation names? is it possible to call on these indexes there or must we use indexes ONLY in triggers? ![]() |
| 03-01-2005, 11:35 AM | #8 |
1. you can change the mdl file of the model so the animation is looping(convert the mdx file to mdl and then search the animation you want to change, I think you must add the word "looping" somewhere) 2. i don't know the answer of the second question, sorry |
