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

I cant sleep again

Status
Not open for further replies.
Level 3
Joined
Mar 5, 2011
Messages
28
Like the tittle says, i cant sleep again, cuz i have a question. How can i put a death animation (like the naga explosion of water)? If it helps, i got magos model editor.
 
Level 3
Joined
Mar 6, 2011
Messages
26
Just do this:

  • Building Death Animation
    • Events
      • Unit - Building 0001 <gen> Dies
    • Conditions
    • Actions
      • Set Temp_Point = (Position of (Triggering unit))
      • Special Effect - Create a special effect at Temp_Point using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
      • Wait 2.00 seconds
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation (udg_Temp_Point)
I'm using this on my project, so I think it could work for you. Good luck!
 
Level 3
Joined
Mar 5, 2011
Messages
28
Just do this:

  • Building Death Animation
    • Events
      • Unit - Building 0001 <gen> Dies
    • Conditions
    • Actions
      • Set Temp_Point = (Position of (Triggering unit))
      • Special Effect - Create a special effect at Temp_Point using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
      • Wait 2.00 seconds
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation (udg_Temp_Point)
I'm using this on my project, so I think it could work for you. Good luck!

Thanks... respond this if you want cuz this are just dettails.

1- where says Building... it refers a building or a unit?

2- In what event/action i put the unit i want to give the special effect?

Good luck with your proyect :)
 
Level 9
Joined
Oct 17, 2009
Messages
370
1- They are the same, so it doesn't matter.
2- You don't give the special effect to a unit, you create it at a position (Temp_Point), which u set to where the unit died before you create the position.

That means you have to add which unit type should have the special effect in the conditions if you use A unit dies. (Thats better then a specific unit if you want to apply it to more then one unit in the game.)
 
Level 3
Joined
Mar 6, 2011
Messages
26
Obviously "Building 0001" refers to the building you want to put the death animation. If the units that you want to put the death animation are all of the same type, you could do this:


  • Building Death Animation
    • Events
      • Unite - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equals to Yourbuilding
    • Actions
      • Set Temp_Point = (Position of (Triggering unit))
      • Special Effect - Create a special effect at Temp_Point using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
      • Wait 2.00 seconds
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation (udg_Temp_Point)
This way all units of the same type will have the same death animation. And "Triggering unit" refers to the unit that triggered the event, in this case the dying unit.
 
Level 3
Joined
Mar 6, 2011
Messages
26
The special effect must be destroyed because if not it leaks. And I added the wait function to give the animation time to birth, disappear and then to be destroyed. If not, the animation wouldn't even have time to birth.
 
Level 3
Joined
Mar 6, 2011
Messages
26
Trying to act smart ?
Haha, try to create SFX and destroy it, NO WAIT BORDER IS USED
You'll see what Garfield meant :D

I've just said what I read in a tutorial about special effects and leaks. But whatever, he was right. No wait function is needed, so...thanks anyway ^^
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,287
Destroying a special effect plays its death animation.

Thus the no wait special effect destruction is only usable on effects with no death animation.

Explosisons, most aura buffs and some instant effects are examples of where you can instantly destroy them.
Purge, bloodlust, and missles are examples of where you cannot use instant effect destruction unless you want their death animations.
 
Status
Not open for further replies.
Top