• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Dead unit as doodads, alternatives to usual solutions needed

Level 13
Joined
Sep 8, 2022
Messages
114
I know I can use triggers to create corpses, but the way I work isn't very compatible with that, I like to see everything in the editor and have control over it before I go to game. I have so far been making destructibles with the model file of the desired unit, and placing dead versions, which allows me to place them in conjunction with other doodads, like flies and pathing blockers. Trouble with that is that they are sometimes moved a tiny bit when I start the map, resulting in them being aside the flies and gore doodads rather than on top of them.

Then today I got the bright idea to open up the unit models for my desired corpses in the model editor, delete all the animation sequences that weren't decay flesh, rename decay flesh 'stand' and make it so that the start and end points are the same number so it's just a still model of the unit in decaying position, and use that as a doodad. It crashed the game on test and made the map un-openable - when it got to loading that doodad, world editor just stopped and closed. Luckily I had backed up my map just last night, and so didn't lose a great deal.

Does anyone have any ideas for alternate solutions, or a version of my idea that would actually work? Though I'm thinking of just biting the bullet and trying my best with triggers.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,876
Trouble with that is that they are sometimes moved a tiny bit when I start the map, resulting in them being aside the flies and gore doodads rather than on top of them.
It sounds like you just need to find a solution to this issue, correct?

In which case it may be the way you're setting up your Destructible. Is it completely pathing-less? I don't see it moving too much if that's the case.

But everything needs to "snap to the grid" at the end of the day, although the grid nodes are very small so it shouldn't be too noticeable. It may be wise to rely on the grid when creating your environments, since you can rest assured that objects won't move.

Also, editing a model seems overkill, I could see a single trigger handling the animations for everything:
  • Untitled Trigger 001
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Destructible - Pick every destructible in (Playable map area) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Max life of (Picked destructible)) Equal to 123.00
            • Then - Actions
              • Animation - Play (Picked destructible)'s decay animation
              • Animation - Change (Picked destructible)'s animation speed to 0.00% of its original speed
            • Else - Actions
So you would mark these Destructibles as "special" by giving them a unique max Life, I used 123.00 in this example. That value shouldn't be used by anything else in the Object Editor. Then you control their animations as you see fit. Note that setting the Animation Speed to 0.00% may happen too early and may need a slight delay. A Timer that runs the "Change animation speed" logic after a short delay could solve this.
 
Last edited:
Level 30
Joined
Aug 29, 2012
Messages
1,383
I tend to use a copy of X unit with Locust and then have them play the death animation on map init, it's pretty seamless and retains team color as opposed to destructibles

That being said there's probably something you did wrong with the model editing, because that should definitely work (although importing a separate file can get heavy on the file size front)
 
Level 13
Joined
Sep 8, 2022
Messages
114
I tend to use a copy of X unit with Locust and then have them play the death animation on map init, it's pretty seamless and retains team color as opposed to destructibles

That being said there's probably something you did wrong with the model editing, because that should definitely work (although importing a separate file can get heavy on the file size front)
That's smart - the team color thing on custom destructibles that use unit models always bothered me. I'll attach one of the offending models to this message and you can have a look at it if you want. One of the textures will show up as black but for some reason when I try to import the same texture from my computer it shows up after giving me the message that a texture by this name already exists. I am no modeller, I've pretty much done basic cosmetic edits and while I have played around with more complex stuff I have little actual knowledge beyond that.

It sounds like you just need to find a solution to this issue, correct?

In which case it may be the way you're setting up your Destructible. Is it completely pathing-less? I don't see it moving too much if that's the case.

I was basing them on the barrel destructible and leaving their pathing as default- my map is rather large so I didn't want to overload on pathing blockers and hit the doodad limit unnecessarily. But I just set the pathing of some of the corpse destructibles to none and tested the map twice, they seem to stay in place. That's more important to me now. One or two moved a tiny bit, but I think that's cos they were in awkward places like near a cliff.

Thank you both for the advice.
 

Attachments

  • DeadMyrmidonDoodad.mdx
    223 KB · Views: 4
  • NMD.blp
    171.8 KB · Views: 3
Level 13
Joined
Sep 8, 2022
Messages
114
Okay I cleaned it up a bit, give it a try to see if if still crashes (probably requires to restart the editor after importing)

The textures did appear as normal :)
I tested it in a new map, and it works fine- but I wanted it to be completely still, so I edited it to have the stand sequence start and end numbers be the same, and that made it crash. So I'm confident that that was the problem with my edits. I tried again with yours and made the sequence numbers just 1 apart and that worked and still looked unmoving. Thanks!
 
Top