• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Spell] silence after damage

Status
Not open for further replies.
Level 5
Joined
Jul 24, 2008
Messages
106
Hello Hive! I'm working on a spell called Vivify. I thought would be pretty simple. The spell buffs the caster, and when the caster attacks any enemy unit, the attacked unit will be silenced. I used this damage detection system. But for some reason, it causes mass lag. http://www.hiveworkshop.com/forums/spells-569/gui-friendly-damage-detection-v1-2-1-a-149098/?prev=search%3Ddamage%2520detection%26d%3Dlist%26r%3D20

  • Events
  • Game - GDD_Event becomes Equal to 0.00
  • Conditions
  • (GDD_DamageSource has buff Vivify) Equal to True
  • (GDD_DamagedUnit has buff Silence) Equal to False
  • Actions
  • Unit - Create 1 Dummy for (Owner of GDD_DamageSource) at (Position of GDD_DamagedUnit) facing Default building facing degrees
  • Unit - Add Vivify Silence to (Last created unit)
  • Unit - Set level of Vivify Silence for (Last created unit) to 1
  • Unit - Order (Last created unit) to Neutral Fire Lord - Soul Burn GDD_Damaged Unit
  • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
How do I fix this? (Remove lag) THANKS! :D
 
Level 11
Joined
Feb 14, 2009
Messages
884
Well, first of all, your spell leaks a location because you do not destroy the location in which the dummy spawned. If I understood correctly, maybe the following trigger will work (haven't used WE for quite some time, so please do excuse me if some actions do not exist; I hope you'll understand what I'm trying to do).

  • Events
    • Unit - A unit is attacked
    • Conditions
      • (Attacking Unit) has (Vivify)
    • Actions
      • Set Loc = (Position of (Triggering Unit))
      • Unit - Create 1 Dummy for (Owner of (Attacking Unit)) at Loc facing Default building facing degrees
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Unit - Add Vivify Silence to (Last created unit)
      • Unit - Set level of Vivify Silence for (Last created unit) to 1
      • Unit - Order (Last created unit) to Neutral Fire Lord - Soul Burn (Triggering Unit)
      • Custom script: call RemoveLocation(udg_Loc)
 
Level 11
Joined
Feb 14, 2009
Messages
884
Hmm, when does the lag occur? Maybe the real cause of the lag is somewhere else. Even with your code, you shouldn't experience "heavy lag" when casting a single spell with no special effects...
 
Level 5
Joined
Jul 24, 2008
Messages
106
Umm, the lag occurs after the caster attacks a unit. So much lag that the screen freezes until the buff duration for the main spell is over.
 
Level 5
Joined
Jul 24, 2008
Messages
106
u can show exactly the casting trigger nad attack trigger?

maybe u created too much dummy unit, the posted trigger must be ok so somehow have something problem

the posted trigger is the only trigger involving the spell. the main spell is simply a howl of terror that only affects self to give the buff.
 
Level 7
Joined
Jan 28, 2012
Messages
266
what is the the damage period in soul burn set to? if it is set to 0 it will cause the heavy lag which you are experiencing.after all 1/0 = infinity, try setting the damage period to something like 50, i have had the same problem with a couple of other DoT abilities.
 
Last edited:
Level 2
Joined
Jan 24, 2012
Messages
28
try using this...
event - a unit is attacked
condition - (attacking unit) has buff "your buff"
action - create 1 "dummy" for "you" at (attacked unit) facing (attacked unit)
- add 1 second generic expiration to "dummy"
- order "dummy" to (soul burn) (attacked unit)

it's work for me :thumbs_up:
 
Status
Not open for further replies.
Top