• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Destroy Special Effects Delay

Status
Not open for further replies.
Level 7
Joined
Jun 8, 2010
Messages
283
Hey guys, Ive never really had a problem with this before but for some reason the Destroy Special Effects trigger has some kind of delay. I understand that this trigger wont initiate until the birth animation, stand and finally death animation are completely played, they the trigger will destroy it. The special effects model only has 1 animation which is Stand, so I dont understand what my problem is here. I also know that the Destroy Special Effects trigger does not leak and its the only GUI trigger without having to use custom scripts.

The Create Special Effects trigger works instantly upon the spell click and the special effect is created above my hero unit, however, the Destroy Special Effects will destroy the special effects approx 5 seconds later.

Heres the trigger:
  • flashlight red
    • Events
      • Unit - A unit owned by Player 1 (Red) Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Flashlight
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • flashlight[1] Equal to True
        • Then - Actions
          • Special Effect - Create a special effect attached to the overhead of (Casting unit) using war3mapImported\Light_OFfWHite_10.MDX
          • Set flashlight_fx[1] = (Last created special effect)
          • Set flashlight[1] = False
        • Else - Actions
          • Special Effect - Destroy flashlight_fx[1]
          • Set flashlight[1] = True
Reward: +1Rep
 
Level 14
Joined
Nov 18, 2007
Messages
1,084
The problem is most likely model-related; the sfx has no death animation so it won't get instantly removed.
You could fix the problem either by editing the model to have a death animation or attach the effect to a dummy unit and remove the unit along with destroying the effect. The first method is probably much easier than the second one.
 
Level 8
Joined
Oct 3, 2008
Messages
367
After an effect is 'destroyed', it has to decay. Like a unit. With a death animation, the decaying model isn't seen. Without a death animation, it's clearly visible.

So yeah. Either edit the model, or add the special effect to a dummy and move the dummy somewhere else while the effect on it dies. Killing dummies isn't too smart.
 
Level 7
Joined
Jun 8, 2010
Messages
283
Oh alright thanks to both of you, both explanations really cleared things up about destroying special effects and the con of now having a death animation.

Anyhow how would I import/export the models with either 3dsmax 7,9 or 2010? I dont have the old exporting tools that were used with the ancient blizzard tools with gmax and 3ds max4/5.

I tried using NeoDex 3Ds Max Exporter Script but I had troubles exporting models, also I cant import the old models :| If not Ill just have to recreate them, or is there an easier way?

Edit: Dr Super Good, so you are suggesting that it may not necessarily be the decay animations?
 
Level 7
Joined
Jun 8, 2010
Messages
283
Oh I see, so I cannot instantly turn off the Flaslight Lighting even after I include a decaying animation? :\

Sigh, I spent a couple hours trying to figure out what was wrong with it too and I kept checking my triggers -_- what a waste.
 
Level 7
Joined
Jun 8, 2010
Messages
283
Sorry if I double post but its been nearly 24 hours now but im sure this deserves a bump as this may be several of other people's problems. I managed to fix this issue. Despite whether a Special FX has a death, birth or decay, this does not determine the actual delay of the "Special Effect - Destroy Special Effect" trigger. I knew that something wasnt right here, and the entire solution lied within the Gameplay Constants (;

Code:
Go to Advanced>Gameplay Constants...>Decay Time (sec) - Effects
Change the value of 5 seconds to whatever desired and adjust accordingly.
Note: If you ticked the Display Values as Raw Data, then it should be under the name of "EffectDeathTime".

If set to 0, this will immediately destroy the special effect upon calling Destroy Special Effect. If you want a slight delay it is highly recommended you use .1-1secs. Also I must note that you will NOT immediately destroy the special effect if your special effect has a birth, stand and death animation. The ENTIRE cycle of animations until Death has to be played before the Destroy Special Effect will take action.

If you are reading this and this has helped you, remember to +rep (;
 
Status
Not open for further replies.
Top