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

[Trigger] Leak?

Status
Not open for further replies.
Level 29
Joined
Oct 24, 2012
Messages
6,543
in the Combustion Move New2 trigger ur cleaning / removing leaks and destroying groups are in the then blocks. They should never be in then or else blocks unless created in there. also u have to make sure to destroy / remove the groups / points b4 the skip remaining actions. ur spell should only have 2 triggers also.
splitting a looping trigger into separate triggers is a bad idea because they can collide with each other.
 
Level 13
Joined
Mar 24, 2013
Messages
1,105
in the Combustion Move New2 trigger ur cleaning / removing leaks and destroying groups are in the then blocks. They should never be in then or else blocks unless created in there. also u have to make sure to destroy / remove the groups / points b4 the skip remaining actions. ur spell should only have 2 triggers also.
splitting a looping trigger into separate triggers is a bad idea because they can collide with each other.

I need it to be in the "Then" because the Combustion_Target/Target2 determine the "line"/path the spell follows, if it's removed early then it just goes to the Center of Playable area.

I'm confused.. It is only 2 triggers?..?

UpdateVersion of Trigs
  • Combustion New2
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to [AW] Combustion
    • Actions
      • Set Combustion_Caster = (Triggering unit)
      • Set Combustion_CasterLoc2 = (Position of (Triggering unit))
      • Set Combustion_Target2 = (Target point of ability being cast)
      • Set Combustion_Target = (Combustion_CasterLoc2 offset by 1200.00 towards (Angle from Combustion_CasterLoc2 to Combustion_Target2) degrees)
      • Unit - Create 1 ManaDamage for (Owner of Combustion_Caster) at Combustion_CasterLoc2 facing Combustion_Target2
      • Unit - Add a 1.05 second Generic expiration timer to (Last created unit)
      • Set Combustion_Dummy = (Last created unit)
      • Trigger - Turn on Combustion Move New2 <gen>
      • Custom script: call RemoveLocation(udg_Combustion_CasterLoc2)
  • Combustion Move New2
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set TempPoint = (Position of Combustion_Dummy)
      • Set TempPoint2 = (TempPoint offset by 35.00 towards (Angle from TempPoint to Combustion_Target) degrees)
      • Unit - Move Combustion_Dummy instantly to TempPoint2
      • Set Combustion_UnitGroup = (Units within 55.00 of TempPoint matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of Combustion_Dummy)) Equal to True))))
      • Set Combustion_RandomUnit = (Random 1 units from Combustion_UnitGroup)
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call RemoveLocation(udg_TempPoint2)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Number of units in Combustion_UnitGroup) Equal to 1) or ((Combustion_Dummy is alive) Not equal to True)
        • Then - Actions
          • Trigger - Turn off (This trigger)
          • Unit - Kill Combustion_Dummy
          • Set Combustion_CusUnit = (Random unit from Combustion_RandomUnit)
          • Unit - Set the custom value of Combustion_CusUnit to (Integer(((Max mana of Combustion_CusUnit) - (Mana of Combustion_CusUnit))))
          • Unit - Cause Combustion_Caster to damage Combustion_CusUnit, dealing (Real((Custom value of Combustion_CusUnit))) damage of attack type Chaos and damage type Universal
          • Special Effect - Create a special effect attached to the origin of (Random unit from Combustion_RandomUnit) using Abilities\Spells\Human\Feedback\ArcaneTowerAttack.mdl
          • Special Effect - Destroy (Last created special effect)
          • Set TempPoint = (Position of (Random unit from Combustion_RandomUnit))
          • Floating Text - Create floating text that reads (String((Real((Custom value of (Random unit from Combustion_RandomUnit)))))) at TempPoint with Z offset 0.00, using font size 10.00, color (0.00%, 0.00%, 100.00%), and 0.00% transparency
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
          • Custom script: call RemoveLocation(udg_Combustion_Target)
          • Custom script: call RemoveLocation(udg_Combustion_Target2)
          • Set Combustion_Dummy = No unit
        • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call DestroyGroup(udg_Combustion_UnitGroup)
      • Custom script: call DestroyGroup(udg_Combustion_RandomUnit)
      • Custom script: set udg_Combustion_UnitGroup = null
      • Custom script: set udg_Combustion_RandomUnit = null
---It still creating some bad fps drops...
 
Level 13
Joined
Mar 24, 2013
Messages
1,105
u have to destroy the groups and everything u use in ur then block if u want to do it that way. Also u need to destroy everything in the bottom trigger in case the condition is false. Also do u know that u dont de-index the spell ?

Is there anyway you could show me? I'm just not grasping what it is you're saying. Because I thought I was doing what you just said, but clearly not xD...Also..."de-index" not a clue what that is at all...:p
 
Level 13
Joined
Mar 24, 2013
Messages
1,105
=================Bump=================

I'm not really sure if this even a Leak question... but yes the handle count does rise 100 or so, but I checked with a few other spells that leak much more and do not cause anywhere near such a drop in FPS. I have no idea why this one is causing such a problem.

Is there a problem I'm just not seeing?

@deathismyfriend
I've still not made entire sense of your reply, some further guidance would be terrific!

I don't think the 1st trigger is the issue but here it is:
  • Combustion New2
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to [AW] Combustion
    • Actions
      • Set Combustion_Caster = (Triggering unit)
      • Set Combustion_CasterLoc2 = (Position of (Triggering unit))
      • Set Combustion_Target2 = (Target point of ability being cast)
      • Set Combustion_Target = (Combustion_CasterLoc2 offset by 1200.00 towards (Angle from Combustion_CasterLoc2 to Combustion_Target2) degrees)
      • Unit - Create 1 ManaDamage for (Owner of Combustion_Caster) at Combustion_CasterLoc2 facing Combustion_Target2
      • Unit - Add a 1.05 second Generic expiration timer to (Last created unit)
      • Set Combustion_Dummy = (Last created unit)
      • Trigger - Turn on Combustion Move New2 Copy <gen>
      • Custom script: call RemoveLocation(udg_Combustion_CasterLoc2)

This one is likely the one riddled with issues:
  • Combustion Move New2 Copy
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set TempPoint = (Position of Combustion_Dummy)
      • Set TempPoint2 = (TempPoint offset by 35.00 towards (Angle from TempPoint to Combustion_Target) degrees)
      • Unit - Move Combustion_Dummy instantly to TempPoint2
      • Set Combustion_UnitGroup = (Units within 55.00 of TempPoint matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of Combustion_Dummy)) Equal to True))))
      • Set Combustion_RandomUnit = (Random 1 units from Combustion_UnitGroup)
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call RemoveLocation(udg_TempPoint2)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Number of units in Combustion_UnitGroup) Equal to 1) or ((Combustion_Dummy is alive) Not equal to True)
        • Then - Actions
          • Trigger - Turn off (This trigger)
          • Unit - Kill Combustion_Dummy
          • Set Combustion_CusUnit = (Random unit from Combustion_RandomUnit)
          • Unit - Set the custom value of Combustion_CusUnit to (Integer(((Max mana of Combustion_CusUnit) - (Mana of Combustion_CusUnit))))
          • Unit - Cause Combustion_Caster to damage Combustion_CusUnit, dealing (Real((Custom value of Combustion_CusUnit))) damage of attack type Chaos and damage type Universal
          • Special Effect - Create a special effect attached to the origin of (Random unit from Combustion_RandomUnit) using Abilities\Spells\Human\Feedback\ArcaneTowerAttack.mdl
          • Special Effect - Destroy (Last created special effect)
          • Set TempPoint = (Position of (Random unit from Combustion_RandomUnit))
          • Floating Text - Create floating text that reads (String((Real((Custom value of (Random unit from Combustion_RandomUnit)))))) at TempPoint with Z offset 0.00, using font size 10.00, color (0.00%, 0.00%, 100.00%), and 0.00% transparency
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
          • Custom script: call RemoveLocation(udg_Combustion_Target)
          • Custom script: call RemoveLocation(udg_Combustion_Target2)
          • Set Combustion_Dummy = No unit
        • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call DestroyGroup(udg_Combustion_UnitGroup)
      • Custom script: call DestroyGroup(udg_Combustion_RandomUnit)
      • Custom script: set udg_Combustion_UnitGroup = null
      • Custom script: set udg_Combustion_RandomUnit = null
 
Status
Not open for further replies.
Top