• 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.

[Solved] Unit bleeding/dying animation

Level 12
Joined
Jul 5, 2014
Messages
551
I've tried looking this up but found nothing: how did the campaigns do the bleeding/dying animation where the unit is still alive? I didn't see a unit animation like that but Gul'dan in the Sentinel Campaign and a footman in Old Hatreds both had this injured animation with bleeding. Here's the one with the footman which is clearly not any stand animation.
bleed.jpg
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,873
You can play a unit's Death animation without them actually dying, it'll spawn the blood and everything. But I imagine they did that + some other effects like manipulating Animation Speed or locking body parts. The blood could even come from a Special Effect.
 
Level 12
Joined
Jul 5, 2014
Messages
551
You can play a unit's Death animation without them actually dying, it'll spawn the blood and everything. But I imagine they did that + some other effects like manipulating Animation Speed or locking body parts. The blood could even come from a Special Effect.
Wonder how. Death animation doesn't look anything like that. The blood would be the easier part but that animation is a weird angle.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,873
Alright, I think I figured out exactly what they did:
  • Start Animation
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Set VariableSet Footman_Dying = Footman 0000 <gen>
      • Animation - Play Footman_Dying's stand animation, using only Common animations
      • Animation - Lock Footman_Dying's Chest to face Footman_Dying, offset by (-45.00, -45.00, -45.00)
      • Special Effect - Create a special effect attached to the chest of Footman_Dying using Objects\Spawnmodels\Other\OrcBloodCinematicEffect\OrcBloodCinematicEffect.mdl
      • Set VariableSet Footman_Dying_Sfx = (Last created special effect)
      • Wait 4.00 seconds
      • Special Effect - Destroy Footman_Dying_Sfx
      • Animation - Reset Footman_Dying's body-part facing
      • Unit - Kill Footman_Dying
 

Attachments

  • Hurt Footman.w3m
    17.2 KB · Views: 6
Level 14
Joined
Nov 4, 2006
Messages
1,241
they are using a special effect for the blood and the lock head action for the facing downwards, trigger below


here is the cinematic trigger setup from the campaign file:

  • Survivor Setup
    • Events
    • Conditions
    • Actions
      • -------- Save Camera Position --------
      • Set VariableSet CameraReturnPoint = (Target of current camera view)
      • -------- Set Sky --------
      • Environment - Set sky to Lordaeron Summer Sky
      • -------- Save Selection --------
      • Set VariableSet SelectedUnits = (Units currently selected by AP1_Player)
      • Selection - Clear selection
      • -------- Prep Heroes --------
      • Unit - Create 1 Veteran Footman for P11_Humans at (Center of WoundedFootman <gen>) facing (Center of Survivor Start Rokhan <gen>)
      • Set VariableSet WoundedFootman = (Last created unit)
      • Animation - Change WoundedFootman blend time to 0.60
      • Animation - Play WoundedFootman's stand animation, using only Common animations
      • Animation - Lock WoundedFootman's Head to face Jaina, offset by (0.00, 0.00, -50.00)
      • Animation - Lock WoundedFootman's Chest to face Jaina, offset by (0.00, 0.00, -490.00)
      • Special Effect - Create a special effect attached to the chest of WoundedFootman using Objects\Spawnmodels\Other\OrcBloodCinematicEffect\OrcBloodCinematicEffect.mdl
      • Set VariableSet RevivalSpotRexxar = (Center of Survivor Start Rexxar <gen>)
      • Set VariableSet RevivalSpotRokhan = (Center of Survivor Start Rokhan <gen>)
      • Set VariableSet RevivalSpotChen = (Center of Survivor Start Chen <gen>)
      • Set VariableSet RevivalSpotCairne = (Center of Survivor Start Cairne <gen>)
      • Set VariableSet RevivalSpotJaina = (Center of Survivor Start Jaina <gen>)
      • Set VariableSet RevivalFacingRexxar = 0.00
      • Set VariableSet RevivalFacingRokhan = 160.00
      • Set VariableSet RevivalFacingChen = 210.00
      • Set VariableSet RevivalFacingCairne = 0.00
      • Set VariableSet RevivalFacingJaina = 180.00
      • Trigger - Run Cinematics Prep Heroes <gen> (checking conditions)
      • -------- Pause Time Of Day --------
      • Game - Turn the day/night cycle Off
      • -------- Pause Units --------
      • Unit - Pause all units
      • Trigger - Run Cinematics Heroes Unpause <gen> (checking conditions)
      • -------- Hide Units --------
      • Set VariableSet HiddenUnits = (Units owned by AP1_Player matching (((Matching unit) is hidden) Equal to False).)
      • Unit Group - Add all units of (Units owned by P12_Naga matching (((Matching unit) is alive) Equal to True).) to HiddenUnits
      • Trigger - Run Cinematics Heroes Dont Hide <gen> (checking conditions)
      • Unit Group - Pick every unit in HiddenUnits and do (Unit - Hide (Picked unit))
      • -------- Hide Items --------
      • Item - Pick every item in (Playable map area) and do (Item - Hide (Picked item))
      • -------- Remove Buffs --------
      • Unit Group - Pick every unit in (Units owned by AP1_Player.) and do (Unit - Remove All except expiration timer buffs from (Picked unit))
      • -------- Disable Abilities --------
      • Trigger - Run Cinematics Disable Abilities <gen> (checking conditions)
      • Trigger - Run Cinematics Disable Talky Effects <gen> (checking conditions)
      • -------- Music Theme --------
      • Sound - Play Human X1, skipping the first 10.75 seconds
and here is the cinematic trigger:

  • Survivor Cinematic Q
    • Events
    • Conditions
      • GameOver Equal to False
    • Actions
      • Set VariableSet InCinematic = True
      • Wait 2.00 seconds
      • -------- Fade Out --------
      • Cinematic - Fade out over 1.00 seconds using texture White Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
      • Wait 1.00 seconds
      • -------- Set Up Scene --------
      • Cinematic - Turn cinematic mode On for (All players)
      • Wait 0.25 seconds
      • If (GameOver Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Trigger - Run Survivor Setup <gen> (checking conditions)
      • Wait 0.25 seconds
      • Camera - Apply Survivor 01A <gen> for AP1_Player over 0.00 seconds
      • Unit - Make Chen face Jaina over 0.30 seconds
      • -------- Fade In --------
      • Cinematic - Fade in over 1.00 seconds using texture White Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
      • Wait 1.00 seconds
      • Set VariableSet SurvivorSkipped = False
      • Trigger - Turn on Survivor Skipped <gen>
      • -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
      • -------- CINEMATIC BEGINS - Cinematic Can Now Be Skipped --------
      • -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
      • -------- Line --------
      • Cinematic - Play Dialogue to (All players) from Rexxar with type Rexxar. Play D13Rexxar10 <gen>. Modify duration: Add 0.00 seconds and Don't wait
      • Wait for D13Rexxar10 <gen> to be 0.00 seconds from finished playing
      • If (SurvivorSkipped Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Unit - Order Jaina to Move To (Center of EndJainaMoveTo <gen>)
      • -------- Line --------
      • Camera - Apply WoundedFootmanA <gen> for AP1_Player over 0.00 seconds
      • Unit - Make Chen face WoundedFootman over 0.30 seconds
      • Wait 1.00 seconds
      • If (SurvivorSkipped Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Camera - Apply Camera 033 <gen> for AP1_Player over 6.00 seconds
      • Unit - Order Rexxar to Move To (Center of EndRexxarMoveTo <gen>)
      • Animation - Lock Jaina's Head to face WoundedFootman, offset by (0.00, 0.00, 90.00)
      • Cinematic - Play Dialogue to (All players) from Jaina with type Jaina. Play D13Jaina11 <gen>. Modify duration: Add 0.00 seconds and Don't wait
      • Wait for D13Jaina11 <gen> to be 0.00 seconds from finished playing
      • If (SurvivorSkipped Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • -------- Line --------
      • Cinematic - Flash a speech indicator for WoundedFootman of color (100.00%, 100.00%, 100.00%) with 0.00% transparency
      • Set VariableSet FootmanSpeaker = WoundedFootman
      • Cinematic - Play Dialogue to (All players) from FootmanSpeaker with type (Unit-type of FootmanSpeaker). Play D13DyingFootman12 <gen>. Modify duration: Add 0.00 seconds and Don't wait
      • Sound - Set Animation and Spell Sounds to 85.00%
      • Wait for D13DyingFootman12 <gen> to be 0.00 seconds from finished playing
      • If (SurvivorSkipped Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Animation - Reset WoundedFootman's body-part facing
      • Unit - Kill WoundedFootman
      • Trigger - Run Create Frostguard <gen> (checking conditions)
      • Wait 1.00 seconds
      • If (SurvivorSkipped Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • -------- Line --------
      • Cinematic - Play Dialogue to (All players) from Jaina with type Jaina. Play D13Jaina13 <gen>. Modify duration: Add 0.00 seconds and Don't wait
      • Wait 1.30 seconds
      • If (SurvivorSkipped Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Sound - Setup all volume channels for speech
      • Wait for D13Jaina13 <gen> to be 0.00 seconds from finished playing
      • If (SurvivorSkipped Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • -------- Line --------
      • Unit - Make Rexxar face Jaina over 0.30 seconds
      • Cinematic - Play Dialogue to (All players) from Rexxar with type Rexxar. Play D13Rexxar14 <gen>. Modify duration: Add 0.00 seconds and Don't wait
      • Wait for D13Rexxar14 <gen> to be 0.50 seconds from finished playing
      • If (SurvivorSkipped Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • -------- Line --------
      • Animation - Lock Jaina's Head to face Rexxar, offset by (0.00, 0.00, 90.00)
      • Cinematic - Play Dialogue to (All players) from Jaina with type Jaina. Play D13Jaina15 <gen>. Modify duration: Add 0.00 seconds and Don't wait
      • Wait for D13Jaina15 <gen> to be 0.00 seconds from finished playing
      • If (SurvivorSkipped Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
      • -------- CINEMATIC ENDS - Cinematic Can No Longer Be Skipped --------
      • -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
      • Trigger - Turn off Survivor Skipped <gen>
      • -------- Fade Out --------
      • Cinematic - Fade out over 1.00 seconds using texture White Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
      • Wait 1.00 seconds
      • -------- Cleanup --------
      • Trigger - Run Survivor Cleanup <gen> (checking conditions)
      • Cinematic - Turn cinematic mode Off for (All players)
      • -------- Fade In --------
      • Cinematic - Fade in over 1.00 seconds using texture White Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
      • Wait 1.00 seconds
      • Set VariableSet InCinematic = False
      • Trigger - Remove (This trigger) from the trigger queue

hope this helps

Edit: well i guess Uncle was faster :p
 
Level 12
Joined
Jul 5, 2014
Messages
551
Alright, I think I figured out exactly what they did:
  • Start Animation
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Set VariableSet Footman_Dying = Footman 0000 <gen>
      • Animation - Play Footman_Dying's stand animation, using only Common animations
      • Animation - Lock Footman_Dying's Chest to face Footman_Dying, offset by (-45.00, -45.00, -45.00)
      • Special Effect - Create a special effect attached to the chest of Footman_Dying using Objects\Spawnmodels\Other\OrcBloodCinematicEffect\OrcBloodCinematicEffect.mdl
      • Set VariableSet Footman_Dying_Sfx = (Last created special effect)
      • Wait 4.00 seconds
      • Special Effect - Destroy Footman_Dying_Sfx
      • Animation - Reset Footman_Dying's body-part facing
      • Unit - Kill Footman_Dying
Yes, I had a hunch but I didn't know the parameters. Thanks, it's embarrassing how simple the solution is. What's that attachment?

Edit: The campaign version differs but strangely, it functions similarly. I really don't get what these parameters do, lol.
 
Last edited:

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,873
Yes, I had a hunch but I didn't know the parameters. Thanks, it's embarrassing how simple the solution is. What's that attachment?

Edit: The campaign version someone differs but strangely, it functions similarly. I really don't get what these parameters do, lol.
Yeah, I mean at this point you might as well use whatever you think looks best. I think my setup looked a bit better with the Z axis set to -15 (slightly less hunched over, more natural looking), but I tried to make it resemble the video as much as possible.

The Special Effect is the bleed effect. It automatically loops which is nice.
 
Level 12
Joined
Jul 5, 2014
Messages
551
Yeah, I mean at this point you might as well use whatever you think looks best. I think my setup looked a bit better with the Z axis set to -15 (slightly less hunched over, more natural looking), but I tried to make it resemble the video as much as possible.

The Special Effect is the bleed effect. It automatically loops which is nice.
But what was that w3m file for if this stuff is triggered?
 
Level 12
Joined
Jul 5, 2014
Messages
551
Oh, I thought you meant the Special Effect since it was "attached" to the unit. It's a map containing an example of that trigger. That trigger is all you need.
Oh. If I'm really crude with this, that trigger can be done with 2 actions, one for the hunch and one for the blood, other than that, it's just organizing and eliminating leak. By the way, I've read that special effects can cause a great deal of memory leak. Is it just triggers or placed cinematic doodads and use of abilities also cause it?
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,873
There are some that exists only for the intro, so after that they're useless. Not sure how much memory they take up though.
It's likely not worth worrying about if they're "one time" things. The issue is when you constantly create them, for instance using a Timer or Periodic Interval trigger that continues on and on. You can imagine a scenario where you accidentally leak 500 Special Effects per minute for 40 minutes straight. By the end of the game you'll have leaked 20,000 times, possibly causing some noticeable performance issues. I doubt you're doing anything remotely close to that though.
 
Level 12
Joined
Jul 5, 2014
Messages
551
It's likely not worth worrying about if they're "one time" things. The issue is when you constantly create them, for instance using a Timer or Periodic Interval trigger that continues on and on. You can imagine a scenario where you accidentally leak 500 Special Effects per minute for 40 minutes straight. By the end of the game you'll have leaked 20,000 times, possibly causing some noticeable performance issues. I doubt you're doing anything remotely close to that though.
I suppose we'll see in the end. It's a pretty big map by default with lots of stuff on it, although I'm not sure they make up 20.000 things.
 
Top