• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Unit animates differently offscreen

Status
Not open for further replies.
Level 14
Joined
Aug 30, 2004
Messages
909
I have a ship that blows up. When it blows up, I replace it with a "locust" version of itself, and play the locust's death animation. I order it to lower it's flying height as well. When it reaches the ground I pause the unit's animation and the unit itself. This makes it look like the ship crashes into the ground and leaves behind a wreckage.

Everything works great when you kill the ship and watch it onscreen. But when the ship dies off screen, it appears to animate differently..which is to say it doesn't animate at all. The ship can be seen near the ground (i.e. the "lower unit's flying height" action works correctly) but the ship is not in the middle of its death animation. Instead it appears to be paused in the middle of its stand animation.

I seem to recall having this trouble before, when I order a unit to play an animation, but since no one can see it it doesn't work.

Does anyone have any ideas on how to fix this? If I can't do it, is there a way to detect if a unit is on the screen of a player? Keep in mind the player's camera could be different depending on what he's doing.
 
Level 14
Joined
Aug 30, 2004
Messages
909
If I kill the unit rather than play its death animation it just disappears (even though I pause its animation and pause the unit).

I haven't tried a dummy ability with a death animation, but I'd be surprised if that's it (sorry). When I order him to play his death animation he does in fact do it...just not if he's not on my screen.
 
Level 14
Joined
Aug 30, 2004
Messages
909
I've uploaded a test map to illustrate the problem:

http://www.hiveworkshop.com/forums/pastebin_data/v2hy50/_files/death bug.w3x

Here's what to do. The first time you play the map, click the Thunderclap ability and watch the Paladin. He will slowly die and then pause. This is what I want.

Now, restart the map. This time, scroll away so you can't see the Paladin, and click Thunderclap. Wait until he's paused. Then scroll back an you'll see him standing. The computer won't render his animation unless you are looking at it.

Is there some way to get it to render? I've only had one idea so far... which is to fade to black early in the map, kill twenty of these units, pause them, hide them, and then bring them out when needed. But I'm not sure units that are hidden and unhidden will retain their animation.... it's also a tremendously ugly work around.
 
Level 12
Joined
Mar 13, 2012
Messages
1,121
Remove the death animation from the ability and do something like this:

  • Untitled Trigger 001
    • Events
      • Unit - Paladin 0000 <gen> Starts the effect of an ability
    • Conditions
    • Actions
      • Unit - Pause Paladin 0000 <gen>
      • Animation - Play Paladin 0000 <gen>'s death animation
There is a bug with animation speeds when the unit is not rendered.
 
Level 14
Joined
Aug 30, 2004
Messages
909
I'm afraid that doesn't fix it. I removed the death animation from thunder clap and used this trigger:

  • Untitled Trigger 001
    • Events
      • Unit - Paladin 0000 <gen> Starts the effect of an ability
    • Conditions
    • Actions
      • Unit - Pause Paladin 0000 <gen>
      • Animation - Play Paladin 0000 <gen>'s death animation
      • Wait 2.00 game-time seconds
      • Animation - Change Paladin 0000 <gen>'s animation speed to 0.00% of its original speed
If I'm watching him it works fine. If I'm not watching him when he dies he will be standing when I pan back to him.

UPDATE:

I figured out what you meant and just dropped the animation speed entirely. It worked out nicely on the test map, but in the actual game I kind of want to pause the animation before the final frame (i.e. in the paladin example I'd like to pause him before he hits the ground). Is that possible?
 
Last edited:
Level 14
Joined
Aug 30, 2004
Messages
909
Sorry, I think my update went in after your response, but I did in fact do what you suggested, and it did work on the paladin. Unfortunately it doesn't solve my problem because it pauses the paladin at the end of his animation, and I need him paused in the middle.

I made a new test map with the model I'm trying to work with. You'll see what I mean. Just click the paladin's thunderclap and you'll see the ship crash:

http://www.hiveworkshop.com/forums/pastebin_data/pcu3l2/_files/death bug.w3x
 
Level 14
Joined
Aug 30, 2004
Messages
909
Beautiful!!! I really didn't think this was fixable, but it never occurred to me to just trim the death animation in the model editor.

You are a kind man whose generosity will make it easier for me to sleep tonight. May the light of human kindness shine upon you very soon.

Also, +rep.
 
Status
Not open for further replies.
Top