• 🏆 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!

Attaching Special Effect on custom ability

Status
Not open for further replies.
Level 11
Joined
May 7, 2008
Messages
300
I'm using this ability made by one of the Hive users and it works perfectly fine.

However whenever I try to add this custom model to the position or on the unit, it doesn't properly play the animation of the added spell.

I just want the bladestorm animation happening whenever counter helix procs and that it gets removed immediately after the ability has been triggered. I'm using blademaster hero with barbarian skin on top of that (supports spinning animations).
 

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,457
You need to destroy temporary Special Effects like these or else they'll leak, however, not every Special Effect model is designed to work properly when this happens. Some models don't have a Death animation and thus when destroyed they'll disappear abruptly. You probably won't even see the Special Effect in the first place because it's destroyed immediately after it's created.

If that's the issue then you need to destroy the special effect after a delay to allow it to play a good portion of it's initial Birth/Stand animation. I attached a map with a simple system for doing so.

Here are the triggers if you can't open the map:
  • Delayed Destroy Effect
    • Events
    • Conditions
    • Actions
      • Custom script: local effect sfx = GetLastCreatedEffectBJ()
      • Wait Delayed_Duration seconds
      • Custom script: call DestroyEffect(sfx)
      • Custom script: set sfx = null
An example of using it:
  • Example DDE
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Special Effect - Create a special effect attached to the chest of (Triggering unit) using Abilities\Spells\Human\DivineShield\DivineShieldTarget.mdl
      • Set VariableSet Delayed_Duration = 1.00
      • Trigger - Run Delayed Destroy Effect <gen> (ignoring conditions)
 

Attachments

  • Delayed Destroy Effect.w3m
    17.3 KB · Views: 13
Level 11
Joined
May 7, 2008
Messages
300
You need to destroy temporary Special Effects like these or else they'll leak, however, not every Special Effect model is designed to work properly when this happens. Some models don't have a Death animation and thus when destroyed they'll disappear abruptly. You probably won't even see the Special Effect in the first place because it's destroyed immediately after it's created.

If that's the issue then you need to destroy the special effect after a delay to allow it to play a good portion of it's initial Birth/Stand animation. I attached a map with a simple system for doing so.

Here are the triggers if you can't open the map:
  • Delayed Destroy Effect
    • Events
    • Conditions
    • Actions
      • Custom script: local effect sfx = GetLastCreatedEffectBJ()
      • Wait Delayed_Duration seconds
      • Custom script: call DestroyEffect(sfx)
      • Custom script: set sfx = null
An example of using it:
  • Example DDE
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Special Effect - Create a special effect attached to the chest of (Triggering unit) using Abilities\Spells\Human\DivineShield\DivineShieldTarget.mdl
      • Set VariableSet Delayed_Duration = 1.00
      • Trigger - Run Delayed Destroy Effect <gen> (ignoring conditions)
Excellent work, will check it out once I get on my laptop! Thanks for the help.
 
Status
Not open for further replies.
Top