- Joined
- Feb 22, 2025
- Messages
- 315
1. Manipulating SFX lifetime (not me asking about SFX again
):
I’m creating effects(like Illidan footprints) every few steps. I destroy them immediately, but the death animation still plays for several seconds, which looks awkward.
I’ve tried Set Time Scale and color changes, but they don’t work.
I suppose that changing the color of the sfx just plays with the how should i put it; pigmentation of the sfx, not the actual color. Also I hoped that by setting the given sfx to bigger time scale would speed up its death animation, but no, so this leads me to believe that specific sfx is hardcoded, and can't be manipulated by time scale.
2. Cleanup / nullifying variables:
In my loop, I remove units, destroy groups, and clear special effects.
Thank you for your time,
Regards, Axo
I’m creating effects(like Illidan footprints) every few steps. I destroy them immediately, but the death animation still plays for several seconds, which looks awkward.
I’ve tried Set Time Scale and color changes, but they don’t work.
- Is there a way to speed up or shorten SFX death animation in MUI?
- If not, are there recommended workarounds (e.g., swapping models, simpler particle effects, alternate sfx trails, other techniques used in spells to avoid long death animations)?
- Any workarounds to achieve the desired effect? ( Couldn't find suitable models in resource section, wow converted sfx models usually have no visuals for death animation so destroying them right away would make them not visible at all.)
I suppose that changing the color of the sfx just plays with the how should i put it; pigmentation of the sfx, not the actual color. Also I hoped that by setting the given sfx to bigger time scale would speed up its death animation, but no, so this leads me to believe that specific sfx is hardcoded, and can't be manipulated by time scale.
2. Cleanup / nullifying variables:
In my loop, I remove units, destroy groups, and clear special effects.
- Is it good practice to also nullify/reset all related variables/arrays before starting a new instance, or is just cleaning the units/groups sufficient?
- Since Unit Group and Sfx variables cannot be nullified in GUI, if the action is indeed needed, is it a common practice to nullify them using JASS?
-
FW Loop
-

Events
-


Time - Every 0.03 seconds of game time
-
-

Conditions
-

Actions
-


-------- Loop through all active instances --------
-


For each (Integer FW_Loop_I) from 1 to FW_MaxIndex, do (Actions)
-



Loop - Actions
-




-------- Unit still exist ? --------
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






FW_Wolf[FW_Loop_I] Not equal to No unit
-
-





Then - Actions
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








FW_Phase[FW_Loop_I] Equal to 0
-
-







Then - Actions
-








-------- Phase 0: Initial delay --------
-








Set FW_Delay[FW_Loop_I] = (FW_Delay[FW_Loop_I] - 0.03)
-








If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-









If - Conditions
-










FW_Delay[FW_Loop_I] Less than or equal to 0.01
-
-









Then - Actions
-










-------- Delay Finished Start Moving --------
-










Set FW_Phase[FW_Loop_I] = 1
-










Unit - Unhide FW_Wolf[FW_Loop_I]
-










Animation - Change FW_Wolf[FW_Loop_I]'s animation speed to 150.00% of its original speed
-










Special Effect - Create a special effect attached to the chest of FW_Wolf[FW_Loop_I] using Abilities\Spells\Orc\FeralSpirit\feralspirittarget.mdl
-










Special Effect - Destroy (Last created special effect)
-










Special Effect - Create a special effect attached to the origin of FW_Wolf[FW_Loop_I] using Abilities\Weapons\FireBallMissile\FireBallMissile.mdl
-










Set FW_SFX1[FW_Loop_I] = (Last created special effect)
-
-









Else - Actions
-
-
-







Else - Actions
-








-------- Phase 1 Moving --------
-








Set FW_TempPoint = (Position of FW_Wolf[FW_Loop_I])
-








-------- // ----- Staggered trail effect (every 3 steps) ----- --------
-








Set FW_Trail_Counter[FW_Loop_I] = (FW_Trail_Counter[FW_Loop_I] + 1)
-








If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-









If - Conditions
-










FW_Trail_Counter[FW_Loop_I] Equal to 3
-
-









Then - Actions
-










Set FW_Trail_Counter[FW_Loop_I] = 0
-










Set FW_TempReal = (Random real number between -35.00 and 35.00)
-










Set FW_TempReal2 = (Random real number between -15.00 and 15.00)
-










Set FW_TempReal3 = (FW_Angle[FW_Loop_I] + 90.00)
-










Set FW_TempPoint3 = (FW_TempPoint offset by FW_TempReal towards FW_TempReal3 degrees.)
-










Set FW_TempPoint3 = (FW_TempPoint3 offset by FW_TempReal2 towards FW_Angle[FW_Loop_I] degrees.)
-










Special Effect - Create a special effect at FW_TempPoint3 using Objects\Spawnmodels\Other\IllidanFootprint\IllidanSpawnFootPrint1.mdl
-










Special Effect - Set Time Scale of (Last created special effect) to 5.00
-










Special Effect - Set Color of (Last created special effect) to r: 255, g: 0, b: 0
-










Special Effect - Destroy (Last created special effect)
-










Custom script: call RemoveLocation( udg_FW_TempPoint3)
-
-









Else - Actions
-
-








-------- Move one step --------
-








Set FW_TempPoint2 = (FW_TempPoint offset by FW_Step_Speed towards FW_Angle[FW_Loop_I] degrees.)
-








Unit - Move FW_Wolf[FW_Loop_I] instantly to FW_TempPoint2
-








Set FW_Distance[FW_Loop_I] = (FW_Distance[FW_Loop_I] + FW_Step_Speed)
-








-------- // ----- Damage units in a 120 AoE ----- --------
-








Set FW_Group = (Units within 120.00 of FW_TempPoint2 matching ((((Matching unit) belongs to an enemy of (Owner of FW_Caster[FW_Loop_I]).) Equal to True) and ((((Matching unit) is hidden) Equal to False) and (((Matching unit) is alive) Equal to True))).)
-








Unit Group - Pick every unit in FW_Group and do (Actions)
-









Loop - Actions
-










Set FW_TempUnit = (Picked unit)
-










If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-











If - Conditions
-












(FW_TempUnit is in FW_DMG_Group[FW_Loop_I].) Equal to False
-
-











Then - Actions
-












Unit Group - Add FW_TempUnit to FW_DMG_Group[FW_Loop_I]
-












-------- DMG --------
-












Unit - Cause FW_Caster[FW_Loop_I] to damage FW_TempUnit, dealing 200.00 damage of attack type Spells and damage type Normal
-












-------- Root Dummy --------
-












Set FW_TempPoint = (Position of FW_TempUnit)
-












Unit - Create 1 Root Dummy for (Owner of FW_Caster[FW_Loop_I]) at FW_TempPoint facing Default building facing degrees
-












Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-












Unit - Order (Last created unit) to Night Elf Keeper Of The Grove - Entangling Roots FW_TempUnit
-












-------- Armor Reduction Dummy --------
-












Unit - Create 1 Armor Dummy for (Owner of FW_Caster[FW_Loop_I]) at FW_TempPoint facing Default building facing degrees
-












Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-












Unit - Order (Last created unit) to Night Elf Druid Of The Talon - Faerie Fire FW_TempUnit
-












Special Effect - Create a special effect attached to the chest of FW_TempUnit using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
-












Special Effect - Destroy (Last created special effect)
-
-











Else - Actions
-
-
-
-








Custom script: call DestroyGroup( udg_FW_Group)
-








Custom script: // ----- Check if reached max distance -----
-








If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-









If - Conditions
-










FW_Distance[FW_Loop_I] Greater than or equal to FW_Max_Distance
-
-









Then - Actions
-










-------- // ----- Clean up this instance ----- --------
-










Unit - Remove FW_Wolf[FW_Loop_I] from the game
-










Special Effect - Destroy FW_SFX1[FW_Loop_I]
-










Custom script: call DestroyGroup( udg_FW_DMG_Group[udg_FW_Loop_I])
-










-------- // ----- Swap the last active instance into the freed slot ----- --------
-










Set FW_Caster[FW_Loop_I] = FW_Caster[FW_MaxIndex]
-










Set FW_Wolf[FW_Loop_I] = FW_Wolf[FW_MaxIndex]
-










Set FW_Angle[FW_Loop_I] = FW_Angle[FW_MaxIndex]
-










Set FW_Distance[FW_Loop_I] = FW_Distance[FW_MaxIndex]
-










Set FW_Phase[FW_Loop_I] = FW_Phase[FW_MaxIndex]
-










Set FW_Delay[FW_Loop_I] = FW_Delay[FW_MaxIndex]
-










Set FW_DMG_Group[FW_Loop_I] = FW_DMG_Group[FW_MaxIndex]
-










Set FW_SFX1[FW_Loop_I] = FW_SFX1[FW_MaxIndex]
-










-------- // ----- Clear the last slot??? --------
-










Set FW_Caster[FW_MaxIndex] = No unit
-










Set FW_Wolf[FW_MaxIndex] = No unit
-










Set FW_Angle[FW_MaxIndex] = 0.00
-










Set FW_Distance[FW_MaxIndex] = 0.00
-










Set FW_Phase[FW_MaxIndex] = 0
-










Set FW_Delay[FW_MaxIndex] = 0.00
-










-------- // ----- Decrease max index and adjust loop counter ----- --------
-










Set FW_MaxIndex = (FW_MaxIndex - 1)
-










Set FW_Loop_I = (FW_Loop_I - 1)
-










-------- Final effect at last know position --------
-










Set FW_TempPoint = FW_TempPoint2
-










Special Effect - Create a special effect at FW_TempPoint using Abilities\Spells\Orc\FeralSpirit\feralspirittarget.mdl
-










Special Effect - Destroy (Last created special effect)
-










Custom script: call RemoveLocation( udg_FW_TempPoint)
-
-









Else - Actions
-
-








-------- // ----- Clean up points used in this iteration ----- --------
-








Custom script: call RemoveLocation( udg_FW_TempPoint)
-








Custom script: call RemoveLocation( udg_FW_TempPoint2)
-
-
-
-





Else - Actions
-
-
-
-


-------- // ----- Turn off loop if no active instances ----- --------
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




FW_MaxIndex Equal to 0
-
-



Then - Actions
-




Trigger - Turn off (This trigger)
-
-



Else - Actions
-
-
-
Thank you for your time,
Regards, Axo


