So I've been trying hard these last days to make a custom zerg unit work as movable when burrowed. But for some reason I'm not getting proper insight on how animations work with actor events. The unit burrows properly, but when burrowed things are not quite smooth.
I'm using the Ultralisk webby model. I'm trying to reproduce the Infestor behavior when burrowed, I replicated some actor events blindly, but the result is not what I expect, since the stand burrow animation that is added from the Ultralisk m3a animations is for some reason bugged. So:
1) How to tell the actor system to skip a precise animation? (in this case, the burrow stand one)
2) How to add after that an event that properly uses the Walk Burrow animation?
3) Which is the best way to add effects when moving burrowed (like the roach or the infestor have) to the unit and to the splat?
4) Can I selectively add certain animations from an m3a file or do I have to add them all? (I xml edited the m3a, deleting unwanted animations, but the results were not as expected)
I'm very confused about AnimBracket, AnimGroup and AnimPlay actions, if someone could clarify, I would be much obliged.
Units that burrow use a Morph type ability to change into another unit. The burrowed version of the unit usually has no mover or the Movement fields have 0 values.
1. If the animation has a number at the end specify variation 00 then.
2. The walking is set under the Animation: Baselines - Animation Properties field of the Unit type actor. Else use an Animation Bracket Apply action with the burrow walk as the content.
3. Probably best to do like the high templar and have a timer system that is validated if the unit is moving it creates the other actors.
4. The actor only uses a specific animation if it is ordered to using the baselines or actor events.
Anim bracket has an opening where it plays an animation on application and a closing where it plays an animation when the animation bracket is removed while the content is an animation that is looped. Animation groups are usually not used but are for animations with identical identifiers and only the last property is different but otherwise work like a bracket. Animplay plays an animation once unless the play forever flag is enabled. Anim play tends to overwite brackets.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
The unit worked as it should regarding to the burrow ability (morph). I had this properly set up already. Is the animations what troubled me (Stand Burrow,Walk Burrow).
The animation I wanted to skip is named "Stand Burrow", no numbers on it. I'm using Ultralisk_CollectionSkin_Webby.m3 model, with UltraliskEx1_RequiredAnims.m3a set up in the Animations (Required)+ field in the actor catalog. For some reason, adding this m3a also added some redundant animations that were already present in the unit (2 stands, 2 attacks, etc etc)
Using Zerg Burrow Standard Anim Macro in the Macros+ field, resulted in the unit being static when standing burrowed (what I wanted), but with no animation when walking burrowed. On the other hand, using Zerg Burrow Mobile Anim Macro (used by the Roach and the Infestor), resulted in a buggy Stand Burrow animation loop, and a proper Walk Burrow animation.
So, following your advice DrSuperEvil, and since I had to modify these macros to do what I wanted, I added new events to the main actor and removed the standard macros. The code I added is the following:
The Stand Burrow animation is played one time only and stopped in its last frame. Since the loop was what bugged it, now it works fine. The AnimBaseline is stopped while burrowed and restored on unburrow.
I also added code for the Burrow Effects, and some extra FX made from the Ultralisk Burrow Charge Model, using timers as suggested.
<!-- Ultralisk Webby Zerg Burrow FX --> <On Terms="AbilMorph.*.Start; AbilKey BurrowDown" Send="Create UltraliskWebbyBurrowMoveEffectExtra"/> <On Terms="UnitMovementUpdate.*.Stand" Target="UltraliskWebbyBurrowMoveEffectExtra" Send="AnimPlay Main Stand PlayForever"/>
<On Terms="UnitMovementUpdate.*.Walk" Target="UltraliskWebbyBurrowMoveEffectExtra" Send="AnimPlay Main Walk PlayForever"/>
This solution works fine, but I suspect I still have room for improving it, since I want to learn better how the actor system works with StarCraft II. Any comments and suggestions are welcome.
And, again, many thanks for your help DrSuperEvil.
Hi!
So I've been trying hard these last days to make a custom zerg unit work as movable when burrowed. But for some reason I'm not getting proper insight on how animations work with actor events. The unit burrows properly, but when burrowed things are not quite smooth.
I'm using the Ultralisk webby model. I'm trying to reproduce the Infestor behavior when burrowed, I replicated some actor events blindly, but the result is not what I expect, since the stand burrow animation that is added from the Ultralisk m3a animations is for some reason bugged. So:
1) How to tell the actor system to skip a precise animation? (in this case, the burrow stand one)
2) How to add after that an event that properly uses the Walk Burrow animation?
3) Which is the best way to add effects when moving burrowed (like the roach or the infestor have) to the unit and to the splat?
4) Can I selectively add certain animations from an m3a file or do I have to add them all? (I xml edited the m3a, deleting unwanted animations, but the results were not as expected)
I'm very confused about AnimBracket, AnimGroup and AnimPlay actions, if someone could clarify, I would be much obliged.
Thank you everyone for your time.
Units that burrow use a Morph type ability to change into another unit. The burrowed version of the unit usually has no mover or the Movement fields have 0 values.
1. If the animation has a number at the end specify variation 00 then.
2. The walking is set under the Animation: Baselines - Animation Properties field of the Unit type actor. Else use an Animation Bracket Apply action with the burrow walk as the content.
3. Probably best to do like the high templar and have a timer system that is validated if the unit is moving it creates the other actors.
4. The actor only uses a specific animation if it is ordered to using the baselines or actor events.
Anim bracket has an opening where it plays an animation on application and a closing where it plays an animation when the animation bracket is removed while the content is an animation that is looped. Animation groups are usually not used but are for animations with identical identifiers and only the last property is different but otherwise work like a bracket. Animplay plays an animation once unless the play forever flag is enabled. Anim play tends to overwite brackets.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
The unit worked as it should regarding to the burrow ability (morph). I had this properly set up already. Is the animations what troubled me (Stand Burrow,Walk Burrow).
The animation I wanted to skip is named "Stand Burrow", no numbers on it. I'm using Ultralisk_CollectionSkin_Webby.m3 model, with UltraliskEx1_RequiredAnims.m3a set up in the Animations (Required)+ field in the actor catalog. For some reason, adding this m3a also added some redundant animations that were already present in the unit (2 stands, 2 attacks, etc etc)
Using Zerg Burrow Standard Anim Macro in the Macros+ field, resulted in the unit being static when standing burrowed (what I wanted), but with no animation when walking burrowed. On the other hand, using Zerg Burrow Mobile Anim Macro (used by the Roach and the Infestor), resulted in a buggy Stand Burrow animation loop, and a proper Walk Burrow animation.
So, following your advice DrSuperEvil, and since I had to modify these macros to do what I wanted, I added new events to the main actor and removed the standard macros. The code I added is the following:
<!-- Ultralisk Webby Zerg Burrow Animations -->
<On Terms="AbilMorph.*.Start; AbilKey BurrowDown" Send="AnimBracketStart Burrow Burrow IGNORE Unburrow ClosingFull,OpeningPlayForever,DontResetOnUnhide"/>
<On Terms="AbilMorph.*.Finish; AbilKey BurrowDown" Send="AnimBaselineStop"/>
<On Terms="AbilMorph.*.Start; AbilKey BurrowUp" Send="AnimBaselineStart"/>
<On Terms="AbilMorph.*.Start; AbilKey BurrowUp" Send="AnimBracketStop Burrow"/>
<On Terms="AbilMorph.*.Finish; AbilKey BurrowUp" Send="AnimBracketStop Burrow Instant"/>
<On Terms="AbilMorph.*.Finish; AbilKey BurrowUp" Send="AnimClear Burrow"/>
<On Terms="UnitMovementUpdate.UltraliskWebbyBurrowed.Walk" Send="AnimPlay Burrow Walk,Burrow PlayForever"/>
<On Terms="UnitMovementUpdate.UltraliskWebbyBurrowed.Stand" Send="AnimPlay Burrow Stand,Burrow PlayForever,NonLooping"/>
The Stand Burrow animation is played one time only and stopped in its last frame. Since the loop was what bugged it, now it works fine. The AnimBaseline is stopped while burrowed and restored on unburrow.
I also added code for the Burrow Effects, and some extra FX made from the Ultralisk Burrow Charge Model, using timers as suggested.
<!-- Ultralisk Webby Zerg Burrow FX -->
<On Terms="AbilMorph.*.Start; AbilKey BurrowDown" Send="Create UltraliskWebbyBurrowMoveEffectExtra"/>
<On Terms="UnitMovementUpdate.*.Stand" Target="UltraliskWebbyBurrowMoveEffectExtra" Send="AnimPlay Main Stand PlayForever"/>
<On Terms="UnitMovementUpdate.*.Walk" Target="UltraliskWebbyBurrowMoveEffectExtra" Send="AnimPlay Main Walk PlayForever"/>
<!-- Ultralisk Webby Zerg Burrow extra FX taken from UltraliskBurrowChargeModel -->
<On Terms="ActorCreation" Send="StatusSet WalkBurrowFX 0"/>
<On Terms="AbilMorph.*.Start; AbilKey BurrowDown" Send="TimerSet 0.400000,0.200000 WalkBurrowFX"/>
<On Terms="TimerExpired; TimerName WalkBurrowFX; IsStatus WalkBurrowFX 1; !ModelIsLowQuality" Send="Create UltraliskWebbyBurrowChargeModel"/>
<On Terms="TimerExpired; TimerName WalkBurrowFX" Send="TimerSet 0.400000,0.200000 WalkBurrowFX"/>
<On Terms="UnitMovementUpdate.UltraliskWebbyBurrowed.Stand" Send="StatusSet WalkBurrowFX 0"/>
<On Terms="UnitMovementUpdate.UltraliskWebbyBurrowed.Walk" Send="StatusSet WalkBurrowFX 1"/>
This solution works fine, but I suspect I still have room for improving it, since I want to learn better how the actor system works with StarCraft II. Any comments and suggestions are welcome.
And, again, many thanks for your help DrSuperEvil.