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

[Solved] Special Effects Issue - Not spawning

Status
Not open for further replies.
Level 8
Joined
May 31, 2009
Messages
101
Hi guys,

In my map I previously had a death animation that worked with no problems, however despite not touching it it seems to have broken. It triggers when the final enemy dies and basically makes him appear to explode. I've attached the trigger that used to work perfectly-

Trigger.JPG


Probably hideously inefficient I know but it worked! However now no special effects occur. I've tried changing "Triggering Unit" to "Dying Unit" but that didn't seem to make a difference. I also removed the

Does anyone know what could be causing this?

EDIT After some digging I found a thread with a similar problem - apparently it's a bug with reforged (thanks again Blizzard!) and restarting your PC fixes it. Voila, it's working again! Leaving this up in case anyone else has the same problem. Though I'm curious if there's any scope to be had to fix this - bit disappointing if special effects arbitrarily stop working!
 
Last edited:
Level 21
Joined
Mar 29, 2020
Messages
1,237
glad you found a solution. you might want to consider fixing up your code anyways - when you have GUI like this:

-create special effect x
-wait 0.5 seconds
- destroy last created special effect

-you are leaving room for problems. if any other special effect is created during the 0.5 second duration - it will be what is destroyed and not the animation you wanted. usually you can just stick the "destroy last created special effect" right after it is created. it will still run its birth/death animation cycle once.
 
Level 20
Joined
Feb 27, 2019
Messages
592
You may not need this for that trigger but for future usage a good idea is to use a local variable to reference special effects that need to be destroyed at a later time. The same technique can used for other variable types such as items or units. However there are some rules how these local variables can be applied, they must be within the same function and be created at the very start of the function. Any local variable that can cause leaks must be nulled.

  • Victory
    • Events
      • Unit - Recipe Peddler 0018 <gen> Dies
    • Conditions
    • Actions
      • Custom script: local effect e
      • Set VariableSet TempPoint = (Position of Recipe Peddler 0018 <gen>)
      • Special Effect - Create a special effect at TempPoint using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
      • Custom script: set e = GetLastCreatedEffectBJ()
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Wait 0.50 game-time seconds
      • Custom script: call DestroyEffect(e)
      • Set VariableSet TempPoint = (Position of Recipe Peddler 0018 <gen>)
      • Special Effect - Create a special effect at TempPoint using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
      • Custom script: set e = GetLastCreatedEffectBJ()
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Wait 0.50 game-time seconds
      • Custom script: call DestroyEffect(e)
      • Custom script: set e = null
 
Status
Not open for further replies.
Top