Shissshhh... "play unit's animation" ruins the whole trigger...

Danhell

New Member
Code:
Trample Front
????Events
????????Unit - Cavalier 0113 <gen> Is attacked
????Conditions
????????((Attacking unit) has buff Trample ) Equal to True
????Actions
????????Set Trample_Front = (Random integer number between 1 and 100)
????????If (Trample_Front Less than or equal to (10 + (Level of Trample??for Cavalier 0113 <gen>))) then do (Unit - Create 1 DUMMY CASTER for (Owner of Cavalier 0113 <gen>) at (Cavalier_Position offset by 100.00 towards (Angle from Cavalier_Position to Trampled_Unit_Position) degrees) facing Trampled_Unit_Position) else do (Skip remaining actions)
????????Set Trampled_Unit_Position = (Position of (Attacking unit))
????????Set Cavalier_Position = (Position of Cavalier 0113 <gen>)
????????Unit - Add TRAMPLE FOR DUMMY??to (Last created unit)
????????Unit - Set level of TRAMPLE FOR DUMMY??for (Last created unit) to (Level of Trample??for Cavalier 0113 <gen>)
????????Unit - Order (Last created unit) to Human Mountain King - Thunder Clap
????????Animation - Play Cavalier 0113 <gen>'s stand victory animation
????????Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
????????Custom script: call RemoveLocation (udg_Trampled_Unit_Position)
????????Custom script: call RemoveLocation (udg_Cavalier_Position)

I guess you see what it does - has a chance to trample the attackers! Its nut, and would work.. it worked, untill i gave the animation line. Its ruined the whole thing, thats actually strange for me, because its after the unit - order. Please help, the animation is the most necessary.... It tries do play an animation, but interrupts it with the attack one (because he is in combat). How could i make the animations to override the attacking ones? Im hopin you help, thanks if yup.
 
Werbung:

Xeridanus

New Member
hmmm, you could try pausing your cavalier, but then you'll have to un-pause him at the end of the spell, also he won't attack or do anything while paused. i just noticed your IF statement... it looks wrong, but you said it worked. you've defined the position variables after they're used and are you using a multi function if statement?
 

james1654

New Member
Maybe an exxecive use of dummy units, where as soon as any cavalier is created, the unit you select is the real unit with the attack and everything, but the unit you THINK you are selcting is the one ontop, the one with the animation and 1 damage. the one ontop is the one you see, and the dummy unit, but they dont know that, if you do it right.
 

Danhell

New Member
Oh my god thank you xeridanus... I am so stupid, i did the action before tsetting the positions T.T.
I guess, it created the unit at the center of the map, because it does, if it doesnt find the correct position.
Pause/Unpause don't work.
But, could you tell me how do we set the stand animation in scripts? not just "stand", because there are different stands like stand 1, stand 2. But how do set these to play?

Btw here is the working trigger:

Code:
Trample Front
????Events
????????Unit - Cavalier 0113 <gen> Is attacked
????Conditions
????????((Attacking unit) has buff Trample ) Equal to True
????Actions
????????Set Trample_Front = (Random integer number between 1 and 100)
????????Set Trampled_Unit_Position = (Position of (Attacking unit))
????????Set Cavalier_Position = (Position of Cavalier 0113 <gen>)
????????If (All Conditions are True) then do (Then Actions) else do (Else Actions)
????????????If - Conditions
????????????????Trample_Front Less than or equal to (10 + (Level of Trample??for Cavalier 0113 <gen>))
????????????Then - Actions
????????????????Unit - Create 1 DUMMY CASTER for (Owner of Cavalier 0113 <gen>) at (Cavalier_Position offset by 50.00 towards (Angle from Cavalier_Position to Trampled_Unit_Position) degrees) facing Default building facing (270.0) degrees
????????????Else - Actions
????????????????Custom script: call RemoveLocation (udg_Cavalier_Position)
????????????????Custom script: call RemoveLocation (udg_Trampled_Unit_Position)
????????????????Skip remaining actions
????????Unit - Add TRAMPLE FOR DUMMY??to (Last created unit)
????????Unit - Set level of TRAMPLE FOR DUMMY??for (Last created unit) to (Level of Trample??for Cavalier 0113 <gen>)
????????Unit - Order (Last created unit) to Human Mountain King - Thunder Clap
????????Animation - Play Cavalier 0113 <gen>'s stand victory animation
????????Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
????????Custom script: call RemoveLocation (udg_Trampled_Unit_Position)
????????Custom script: call RemoveLocation (udg_Cavalier_Position)


Btw can you tell me a spell thats aoe, without target, but doesnt move the ground ? :) I dotn care if it stuns or slows...
 

Xeridanus

New Member
you could just go through the list in the editor under issue order without target then find one that's aoe.

as for changing unit animations, i've had trouble with those in the past, i can't remember how or even if i fixed it. sorry. :(
 

N00byStance

New Member
You can try ordering unit to hold his position, add victory animation tag to it, and removing after few seconds, but I didn't read whole discussion.
 
Werbung:
Top