Ridiculous lag

ArmyOfFrogs

New Member
Reaction score
20
Whenever my hero casts this spell based off of shadow strike which adds critical strike to him for 5 seconds, the game starts lagging extremely bad.. Here's the coding if you can spot anything.

On
Trigger:
  • Events
    • A unit begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Spell
    • Actions
      • If (all conditions are true) then do (then actions) else do (else actions)
        • If - conditions
          • (Level of Spell for (Triggering unit)) equal to 1
        • then - actions
          • countdown timer - start spelltimer as a one shot timer that will expire in 5 seconds
          • unit - add spellcritical to (triggering unit)
          • unit - set level of spellcritical for (triggering unit) to 1
        • else - actions
          • if (all conditions are true)
            • If - conditions
              • (level of expose weakness for (triggering unit)) equal to 2
            • then - actions
              • unit - add spell critical to (triggering unit)
              • countdown timer - start spelltimer as a One-shot timer that will expire in 6 seconds
              • unit - set level of spellcritical for (triggering unit) to 2


Off
Trigger:
  • Events
    • Timer - spelltimer expires
    • conditions
    • actions
      • unit - remove spellcritical from (triggering unit)


If it matters I have another spell trigger running which increases a variable then setting the level of that ability to the variable, each time he attacks. That itself doesn't lag but i'm not sure if it's affecting this spell in some way.

Thanks a bunch if you know whats going on ^^
 

Komaqtion

You can change this now in User CP.
Reaction score
469
First, you can simply copy your trigger by right-clicking the trigger name just above "Events" in the trigger window :D Much easier ;)

Second, change the event in the first trigger to:
Trigger:
  • Unit - A unit Starts the effect of an ability


Thirdly, there is no triggering unit in the second trigger... Just simply put a wait in the first one and then remove the ability there :D

EDIT: And also, instead of those "If"s you could simply do this:
Trigger:
  • Countdown Timer - Start spelltimer as a One-shot timer that will expire in (4.00 + (Real((Level of Spell for (Triggering unit))))) seconds


Though i can't see why you have two different spells and levels in the two if's:
Code:
(Level of [COLOR="Red"]Spell[/COLOR] for (Triggering unit)) equal to [COLOR="Red"]1[/COLOR]
Code:
(level of [COLOR="Red"]expose weakness[/COLOR] for (triggering unit)) equal to [COLOR="Red"]2[/COLOR]
 

ArmyOfFrogs

New Member
Reaction score
20
Silly errors of mine :p But even when I changed that it still lags really bad o_O I'll try to recreate it in a test map and upload it.

Edit: Couldn't be replicated, i suppose that means the other trigger is causing it. I'll go copy paste that trigger over to the new map and see if that affects it like i originally thought ;\

Edit2: I added the other skill, no lag. There was a brief delay when i cast the spell the first time but nothing after that. I'm going to check if it's shadowstrike causing this since i set all values to 0, so the period for damage is 0, which may be causing it to bug out.

Edit3: Nope. I changed the values on the spell, still causes ridiculous lag each time I cast it, and then goes away after the duration of the spell is over.
 

N2o)

Retired.
Reaction score
51
Silly errors of mine :p But even when I changed that it still lags really bad o_O I'll try to recreate it in a test map and upload it.

Edit: Couldn't be replicated, i suppose that means the other trigger is causing it. I'll go copy paste that trigger over to the new map and see if that affects it like i originally thought ;\

Edit2: I added the other skill, no lag. There was a brief delay when i cast the spell the first time but nothing after that. I'm going to check if it's shadowstrike causing this since i set all values to 0, so the period for damage is 0, which may be causing it to bug out.

Edit3: Nope. I changed the values on the spell, still causes ridiculous lag each time I cast it, and then goes away after the duration of the spell is over.

Meaning, most likely, that another trigger in your map is causing the lag.
 

ArmyOfFrogs

New Member
Reaction score
20
The only ones i can think of that actually are in play while using that are

Show Damage
The one that increases attack speed each time the hero attacks a unit.. I'm thinking that might be firing off each time the shadowstrike hurts them (0 seconds) so it's infinitely adding a passive.. I think i'll just change the base ability on the spell. ;\
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Yeah, do so :D That'll definately screw things up a bit XD
 

ArmyOfFrogs

New Member
Reaction score
20
Yeah that fixed it ^^ At first cast it still has a little delay, not entirely sure why but it's manageable, and goes away quickly. Lesson learned: be careful with 0's ^^
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
Preload yous stuff to stop the first cast lag
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top