| 04-04-2007, 03:23 PM | #1 |
I want play attack, attack -2, attack slam and attack spell via triggers. The hero has no attack himself, but when I tell WEU to play attack -2, it plays attack -1 aswell. Any way there to fix it? Maybe a Jass Code? (no clue of Jass) |
| 04-04-2007, 03:48 PM | #2 |
I think this one will work: JASS:call SetUnitAnimationByIndex(unit,1) |
| 04-04-2007, 03:57 PM | #3 |
Thanks for the answer, but as I said: I have not much knowledge about Jass, so..do I put this line into trigger comments? I guess "unit" is to be replaced with the units Jass name, but how to get the Jass name with WEU? The "1" surely stands for the first and second animation, doesnt it? Okay, can I create a trigger like this: Elapsed game time: 2 seconds. Action: call SetUnitAnimationByIndex(unit,1) |
| 04-04-2007, 04:29 PM | #4 |
Trigger: Just replace the "GetTriggerUnit()" with one from the following list to determine which unit plays its animations. GetTriggerUnit() - Triggering Unit GetSpellAbilityUnit() - Casting Unit GetSpellTargetUnit() - Target of Ability being cast GetEnumUnit() - Picked Unit GetFilterUnit() - Matching Unit GetAttackedUnitBJ() - Attacked unit GetAttacker() - Attacking unit edit: tell me if you need one that's not on this list. One important note is that every model has different indexes for different animations. Some units have move on animation index 0, others dont. The best way to find out (without downloading a lot of programs) is to just experiment. Also, note that the indexes do not match the order of animations in the model previewer. |
| 04-04-2007, 06:02 PM | #5 |
My beastmaster still uses both attack animations, but I want him to use only his second one, and that continuously triggered by a spell (keyboard/shortcut event) My trigger: Unit starts the effect of an ability. Ability being cast = Right Axe Swing Custom script: call SetUnitAnimationByIndex( GetSpellAbilityUnit(), 1) Play Beastmasters "attack -2" animation. BTW: The Beastmaster always plays his spellcast animation before the attack animation, although I deleted all animation names in the objects editor. How's that? |
| 04-04-2007, 06:45 PM | #6 |
Remove your second animation thing (the GUI one). And you still have to change the number in the JASS line until you find the right animation. |
| 04-04-2007, 07:17 PM | #7 |
It works! It finally works :) I thank you very much for your help. My Beastmaster is still doing the spellcasting animation before doing my lovely attack anim though, is this because im using "GetSpellAbilityUnit" ? How can I prevent him from doing that? |
| 04-04-2007, 09:08 PM | #8 |
If your trigger has no effect but to set the animation, change the event to Event - A unit begins casting an ability. |
| 04-05-2007, 07:41 AM | #9 |
It ONLY works with "unit starts the effect of an ability"...even worse: With"A unit begins casting an ability", my beastmaster still plays the spell animation. Is there no spell type which has no target in whole wc3 that doesnt fire an animation when used? |
| 04-05-2007, 07:49 AM | #10 |
just remove the animation string in the spell's data in the object editor |
| 04-05-2007, 08:15 AM | #11 |
Thats exactly what I was doing, but still it changed nothing. Nevermind, because Im now using "berserk" and "avatar". These spells do not require animations to fire. (although avatar has the very annoying bug of oversizing my beastmaster after an attack, although it should grow smaller automatically...duration is set to 0.01 seconds. ) Tried to fix this with "Animation: Change size of beastmaster to 100% of its original size" ..but that doesnt seem to help. Well still one thing left: When im pressing the hotkey often very fast, the beastmaster doesnt finish his animation, and tries to proceed with the next one mid-air. Thats bad! (removing and re-adding the ability after the animation results in a wc3 crash) EDIT: Okay, im just messing around with cooldowns now to get the right playstyle. |
| 04-05-2007, 08:15 AM | #12 |
use berserk |
| 04-05-2007, 08:43 AM | #13 |
Got another rather important question, that would add alot more speed and interactivity to my combat map: How to make those abilities usably even while moving? |
| 04-05-2007, 08:45 AM | #14 |
use berserk -.-" Berserk doesnt stop the current animation and it can be used even while moving ... So ... use berserk as trigger for your custom spell stuff ^^ |
| 04-05-2007, 03:49 PM | #15 |
Yes, so far you're right, but when im saying: "Unit uses ability - ability = berserk - play attack animation THEN the unit stops moving, because it has to perform the attack animation. But it should move at the same time. Well I guess I would need custom animations then? Even with customs, maybe wc3 doesnt allow hitting while running. |
