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.