• 🏆 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] Lag Problems

Status
Not open for further replies.
Level 20
Joined
Jan 6, 2008
Messages
2,627
Hi, im trying to make my spell, and it lags alot!
  • Spell
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Flame Strike
    • Actions
      • Set TempCaster = (Triggering unit)
      • Set TempLoc = (Target point of ability being cast)
      • Set TempGroup = (Units within 200.00 of TempLoc)
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) belongs to an enemy of (Owner of TempCaster)) Equal to True
              • ((Picked unit) is Magic Immune) Not equal to True
              • ((Picked unit) has buff Invulnerable) Not equal to True
            • Then - Actions
              • Set TempLoc2 = (Position of (Picked unit))
              • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
              • Set TempFX = (Last created special effect)
              • Special Effect - Destroy TempFX
              • Unit - Cause TempCaster to damage (Picked unit), dealing (Random real number between ((Real((Level of (Ability being cast) for TempCaster))) x 30.00) and ((Real((Level of (Ability being cast) for TempCaster))) x 31.00)) damage of attack type Spells and damage type Normal
              • Custom script: call RemoveLocation(udg_TempLoc2)
            • Else - Actions
      • Custom script: call DestroyGroup(udg_TempGroup)
      • Custom script: call RemoveLocation(udg_TempLoc)
Someone know the reason why?
 

Attachments

  • Spelltest.w3x
    18 KB · Views: 36
Level 8
Joined
Dec 8, 2007
Messages
312
tested your spell.
Lag was gone when I based your spell on channel. There must be something with flamestrike that is not suppose to be changed I guess.

And why you set tempLos2 if it's not even used?
And you can destroy last created special effect without putting it in variable

EDIT: Problem of the flamestrike - it lags if damage intervals is 0. they should be at least 0.01
 
Status
Not open for further replies.
Top