SC2Mapster Forums

Development > Data

(Solved) Attack Animation for ability, without modifying the heros main actor

  • 7 posts
    #1 Feb 09, 2013 at 16:44 UTC - 0 likes

    I want an ability to play my heroes attack animation when an ability is used. But since the ability can be used by more then 1 hero in my map, i dont want to have the anymation in my heros actor, because i would have to add it to all my heroes actors, and since the map has lots of abilities this would be a lot of work and the heroes main actor would get really messy.

    Is there a way to get a animation working that uses a seperate actor for this abilities animation, so that the anymation will be played for every Hero that uses the ability?

    #2 Feb 09, 2013 at 17:26 UTC - 0 likes

    Use an Event Macro actor to handle all your events and just give that actor to each hero like the protoss buildings use for the power animations.

    #3 Feb 09, 2013 at 17:33 UTC - 0 likes

    Note that only works if the animation has the same name for all affected heroes. In that case you can use an Event Macro or a Simple type actor, the former is added to each unit actor while the latter creates itself upon ability cast and uses the Target line to send AnimPlay messages to _Unit or _Selectable.

    With Event Macros you could make multiples to account for varying animation names, but you need 1 for each name.

    #4 Feb 09, 2013 at 19:50 UTC - 0 likes

    With the event macro he just needs an event for each eventuality and can always validate it to compensate for models lacking a desired one.

    #5 Feb 09, 2013 at 20:21 UTC - 0 likes

    @DrSuperEvil: Go

    What would you do if you need several "common" animation names? For example the Marine fires its gun in the Attack animation while Kerrigan's missile attack uses the Spell animation. Continuous animations are often spread between Work and Channel. The use of letter indices varies greatly (Nova uses them instead of numbers, the ARES uses them for its morph modes...)

    Is there a simple way of accounting for this, or would you have to validate unit type/use multiple macros?

    #6 Feb 10, 2013 at 08:57 UTC - 0 likes

    You can do this perfectly with triggers.

    Make a new trigger.

    Set event to ( any unit use ability ) then set the ability you want in.

    Set the action to ( play animation ) and set spell or attack animation as you want.

    If you want it to play attack animation in some units and other units play spell then set a condition ( unit is = the unit you want to create this trigger animation ).

    Then create another trigger with same event , action and condition but change the animation and the unit in the condition ( the unit that you want him to use the other animation.

    • Note

    Use the blend in time in the play animation action to set how fast do you want the unit to play his animation and you dont need to play with unit actors in this way.

    Hope this will help you

    My first map is now available on eu server.

    http://www.sc2mapster.com/maps/end-dreams/

    #7 Feb 13, 2013 at 15:46 UTC - 0 likes

    @Darkillusion95: Go

    I used this way, it worked perfectly and is really easy and fast to do. Huge Thanks.

  • 7 posts

You must login to post a comment. Don't have an account? Register to get one!