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

[Unsolved] Special effects not showing ingame

Status
Not open for further replies.
Level 8
Joined
Jul 10, 2018
Messages
383
  • Boss Spell Shoft
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Boss Spell [Shoft]
    • Actions
      • Unit - Pause (Casting unit)
      • Animation - Play (Casting unit)'s stand victory animation
      • Unit - Make (Casting unit) Invulnerable
      • Wait 10.00 seconds
      • Unit - Cause (Casting unit) to damage circular area after 0.00 seconds of radius 750.00 at (Position of (Casting unit)), dealing 85000.00 damage of attack type Spells and damage type Normal
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Special Effect - Create a special effect at (Position of (Casting unit)) using Abilities\Spells\Human\FlameStrike\FlameStrike1.mdl
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect at (Position of (Casting unit)) using Abilities\Spells\Human\FlameStrike\FlameStrike1.mdl
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect at ((Position of (Casting unit)) offset by 400.00 towards ((Real((Integer A))) x 40.00) degrees) using Abilities\Spells\Human\FlameStrike\FlameStrike1.mdl
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect at (Position of (Casting unit)) using Abilities\Spells\Human\FlameStrike\FlameStrike1.mdl
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect at ((Position of (Casting unit)) offset by 400.00 towards ((Real((Integer A))) x 40.00) degrees) using Abilities\Spells\Human\FlameStrike\FlameStrike1.mdl
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect at (Position of (Casting unit)) using Abilities\Spells\Human\FlameStrike\FlameStrike1.mdl
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect at ((Position of (Casting unit)) offset by 400.00 towards ((Real((Integer A))) x 40.00) degrees) using Abilities\Spells\Human\FlameStrike\FlameStrike1.mdl
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect at (Position of (Casting unit)) using Abilities\Spells\Human\FlameStrike\FlameStrike1.mdl
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect at ((Position of (Casting unit)) offset by 400.00 towards ((Real((Integer A))) x 40.00) degrees) using Abilities\Spells\Human\FlameStrike\FlameStrike1.mdl
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect at ((Position of (Casting unit)) offset by 400.00 towards ((Real((Integer A))) x 40.00) degrees) using Abilities\Spells\Human\FlameStrike\FlameStrike1.mdl
          • Special Effect - Destroy (Last created special effect)
      • Unit - Make (Casting unit) Vulnerable
      • Unit - Unpause (Casting unit)
 
Level 39
Joined
Feb 27, 2007
Messages
4,994
Casting Unit doesn't work properly after a wait (functions like a global variable). Use Triggering Unit. Creating and then immediately destroying an effect will play that effect's death animation; doing what you're doing is probably working, it's just not showing anything because it plays the death animation. Also you are leaking a lot of points.

Event Response Myths
Things That Leak
 
Level 8
Joined
Jul 10, 2018
Messages
383
Casting Unit doesn't work properly after a wait (functions like a global variable). Use Triggering Unit. Creating and then immediately destroying an effect will play that effect's death animation; doing what you're doing is probably working, it's just not showing anything because it plays the death animation. Also you are leaking a lot of points.

Event Response Myths
Things That Leak
still not showing.
 
Level 39
Joined
Feb 27, 2007
Messages
4,994
You clearly did not read what I said about insta-destroying the effects. The death animation of the model you’re using is being played but it’s essentially not visible. Change the effect to anything that has a proper death animation (literally any unit) and you’ll see them pop up.
 
What he means is you should remove the wait, because everytime some unit casts the ability the casting unit variable is replaced with a new unit, in your case when two units casts the ability at the same time (or two units casts the ability within 10 seconds) the first unit who casted the ability will be replaced by the second/more recent unit caster. Replace all those (Casting unit) with (Triggering Unit).

The SFX aren't visible because the SFX is playing Death animation instead of Birth (because you destroyed it too early). SFXs that you used don't have death animation, only birth animation, so you should add this under every Create SFX triggers you have in your trigger.

  • Special Effect - Create a special effect at <loc> using <sfx model>
  • Special Effect - Play Special Effect: (Last created special effect), Animation: Birth
About the leaks, just create a point variable at the top of the loop.
  • Set TempLoc = (Position of (Triggering unit))
Then replace all those (Position of (Casting unit)) with TempLoc
  • Special Effect - Create a special effect at TempLoc using <sfx model>
Then add this at the bottom of the loop
  • Custom script: call RemoveLocation(udg_TempLoc)
 
Level 28
Joined
Feb 18, 2014
Messages
3,579
Use this if you want to make your spell MUI.
  • Boss Spell Shoft
    • Events
      • Unit - Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Boss Spell [Shoft]
    • Actions
      • Set Temp_Integer = (Temp_Integer + 1)
      • Set Caster[Temp_Integer] = (Casting unit)
      • Unit - Pause Caster[Temp_Integer]
      • Unit - Make Caster[Temp_Integer] Invulnerable
      • Animation - Play Caster[Temp_Integer]'s stand victory animation
      • Wait 10.00 seconds
      • Set Temp_Recycle = (Temp_Recycle + 1)
      • Unit - Cause Caster[Temp_Recycle] to damage circular area after 0.00 seconds of radius 750.00 at (Position of Temp_Point), dealing 85000.00 damage of attack type Spells and damage type Normal
      • -------- Play Special effects --------
      • Unit - Unpause Caster[Temp_Recycle]
      • Unit - Make Caster[Temp_Recycle] Vulnerable
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Temp_Recycle Equal to Temp_Integer
        • Then - Actions
          • Set Temp_Integer = 0
          • Set Temp_Recycle = 0
        • Else - Actions
 
Level 8
Joined
Jul 10, 2018
Messages
383
Use this if you want to make your spell MUI.
  • Boss Spell Shoft
    • Events
      • Unit - Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Boss Spell [Shoft]
    • Actions
      • Set Temp_Integer = (Temp_Integer + 1)
      • Set Caster[Temp_Integer] = (Casting unit)
      • Unit - Pause Caster[Temp_Integer]
      • Unit - Make Caster[Temp_Integer] Invulnerable
      • Animation - Play Caster[Temp_Integer]'s stand victory animation
      • Wait 10.00 seconds
      • Set Temp_Recycle = (Temp_Recycle + 1)
      • Unit - Cause Caster[Temp_Recycle] to damage circular area after 0.00 seconds of radius 750.00 at (Position of Temp_Point), dealing 85000.00 damage of attack type Spells and damage type Normal
      • -------- Play Special effects --------
      • Unit - Unpause Caster[Temp_Recycle]
      • Unit - Make Caster[Temp_Recycle] Vulnerable
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Temp_Recycle Equal to Temp_Integer
        • Then - Actions
          • Set Temp_Integer = 0
          • Set Temp_Recycle = 0
        • Else - Actions
What he means is you should remove the wait, because everytime some unit casts the ability the casting unit variable is replaced with a new unit, in your case when two units casts the ability at the same time (or two units casts the ability within 10 seconds) the first unit who casted the ability will be replaced by the second/more recent unit caster. Replace all those (Casting unit) with (Triggering Unit).

The SFX aren't visible because the SFX is playing Death animation instead of Birth (because you destroyed it too early). SFXs that you used don't have death animation, only birth animation, so you should add this under every Create SFX triggers you have in your trigger.

  • Special Effect - Create a special effect at <loc> using <sfx model>
  • Special Effect - Play Special Effect: (Last created special effect), Animation: Birth
About the leaks, just create a point variable at the top of the loop.
  • Set TempLoc = (Position of (Triggering unit))
Then replace all those (Position of (Casting unit)) with TempLoc
  • Special Effect - Create a special effect at TempLoc using <sfx model>
Then add this at the bottom of the loop
  • Custom script: call RemoveLocation(udg_TempLoc)
Still not working lol other special effects work except for this one tho.
 
Level 39
Joined
Feb 27, 2007
Messages
4,994
Still not working lol other special effects work except for this one tho.
The SFX aren't visible because the SFX is playing Death animation instead of Birth (because you destroyed it too early). SFXs that you used don't have death animation, only birth animation, so you should add this under every Create SFX triggers you have in your trigger.
The death animation of the model you’re using is being played but it’s essentially not visible. Change the effect to anything that has a proper death animation (literally any unit) and you’ll see them pop up.
Creating and then immediately destroying an effect will play that effect's death animation; doing what you're doing is probably working, it's just not showing anything because it plays the death animation.
 
Status
Not open for further replies.
Top