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

Mega lag problem

Status
Not open for further replies.
Level 18
Joined
May 11, 2012
Messages
2,103
Ok, so I created spell based on shadow strike.
I created A buff that goes with that spell.

Now, when I order dummy unit to cast that spell onto an enemy unit, it LAGS HORRIBLYYYYYYYYYYY!
I put debug message, and it casts only once, no infinite loop.

Here's the trigger
  • Morrowind
    • Events
      • Game - damageEventTrigger becomes Equal to 1.00
    • Conditions
      • (target is A structure) Not equal to True
      • ((Item carried by target of type Morrowind) is owned) Equal to True
      • (target belongs to an enemy of (Owner of source)) Equal to True
      • (target has buff Slowed (Morrowind Chill)) Not equal to True
      • (source is Magic Immune) Equal to False
    • Actions
      • Set TempPoint = (Position of source)
      • Unit - Create 1 Dummy Caster for (Owner of target) at TempPoint facing Default building facing degrees
      • Unit - Add Morrowind Chill to (Last created unit)
      • Unit - Order (Last created unit) to Night Elf Warden - Shadow Strike source
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: set udg_TempPoint = null
What the hell is the problem?
 
Level 18
Joined
May 11, 2012
Messages
2,103
When you order your conditions in single block like this, it reads them as AND, so all of them must be positive for the trigger to fire.

The "And" check you use only inside "Or Any Conditions are true".

Like here:
If
Or any conditions are true
----== Your conditions here ==
----== Your conditions here ==
----== Your conditions here ==
----== Your conditions here ==
----And all conditions are true
-----------== Your conditions here ==
-----------== Your conditions here ==
-----------== Your conditions here ==
----== Your conditions here ==
----== Your conditions here ==

then
 
Status
Not open for further replies.
Top