• 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.

VERY laggg

Status
Not open for further replies.
Level 4
Joined
Feb 25, 2010
Messages
73
Hi, i'm doing an AoS map and try to create a skill: depending how many enemy unit the attacking creature has around it, more powerful your cleave attack will be.

So... 1 unit around = 0 cleave. 10 units = 40% cleave, etc...

I did a trigger and expected it works and, in fact, works in some way.... But, when there are a bunch of units around the unit, the game lag as hell! Here is the trigger

  • Iron Cleaver
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Iron Cleaver (Ironwood)(DUMMY) for (Attacking unit)) Greater than 0
    • Actions
      • Set IronCleaverGroup = (Number of units in (Units within 425.00 of (Position of (Attacking unit)) matching (((Matching unit) belongs to an enemy of (Owner of (Attacking unit))) Equal to True)))
      • Unit - Add Iron Cleaver to (Attacking unit)
      • Unit - Set level of Iron Cleaver for (Attacking unit) to ((Level of Iron Cleaver (Ironwood)(DUMMY) for (Attacking unit)) x IronCleaverGroup)
I'm a newbie in doing maps, and this is my first, so i'm not know what i'm really doing ewrong... There is some way to reduce the lag?
 
Level 7
Joined
Jan 28, 2012
Messages
266
you should add this
  • Iron Cleaver
  • Events
  • Unit - A unit Is attacked
  • Conditions
  • (Level of Iron Cleaver (Ironwood)(DUMMY) for (Attacking unit)) Greater than 0
  • Actions
  • Set TempLoc = (Position of (Attacking unit))
  • Custom Script: set bj_want_DestroyGroup = true
  • Set IronCleaverGroup = (Number of units in (Units within 425.00 of TempLoc matching (((Matching unit) belongs to an enemy of (Owner of (Attacking unit))) Equal to True)))
  • Unit - Add Iron Cleaver to (Attacking unit)
  • Unit - Set level of Iron Cleaver for (Attacking unit) to ((Level of Iron Cleaver (Ironwood)(DUMMY) for (Attacking unit)) x IronCleaverGroup)
  • custom script: RemoveLocation(udg_TempLoc)
What i have suggested will help a little, you should also set the owner to a player var,
I am not sure if my suggestions will completly get rid of your problem, however they will help.
 
Level 4
Joined
Aug 5, 2011
Messages
99
hmm if the attacking unit has Iron Cleaver (Ironwood)(DUMMY) on lvl 5 and theres 20 enemies near him, that whill set the lvl of iron cleaver to 100 already, which causes lag.
Do you really need that many lvls on iron cleaver? maybe try storing the number of units in a variable and use this integer to calculate the damage of iron cleaver
 
Status
Not open for further replies.
Top