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

Way to make this not lag ?

Status
Not open for further replies.
Level 4
Joined
Apr 15, 2016
Messages
61
  • Timer
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Clone)) and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Night Elf Warden - Fan Of Knives
  • Knives Dummy Stun
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Fan Of Knives
    • Actions
      • Set HI_PickPoint = (Position of (Triggering unit))
      • Set HI_PickGroup = (Units within 300.00 of HI_PickPoint matching (((((Matching unit) is A Hero) Equal to True) and (((Matching unit) is alive) Equal to True)) and (((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True)))
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in HI_PickGroup and do (Actions)
        • Loop - Actions
          • Set HI_PickGroupPoint = (Position of (Picked unit))
          • Unit - Create 1 Dummy Stun - (None) for (Owner of (Triggering unit)) at HI_PickGroupPoint facing Default building facing degrees
          • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Picked unit)
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation(udg_HI_PickPoint)
      • Custom script: call RemoveLocation(udg_HI_PickGroupPoint)
I don't know why but the first trigger action (where it orders all the Clone units) keeps lagging. The second trigger works normally, when I take control of the Clone (the matching unit in the first trigger) and cast it, it casts fine, it stuns correctly, etc. but when I order ALL them (there are more than one) to cast it every 2 seconds the whole game lags as fuck. Do you know how to solve it ?
 
Level 4
Joined
Apr 15, 2016
Messages
61
The size is huuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuge and there are alot of units ... ALOT I MEAN ALOT.

So what can I do to make this work ? The clones are only created when a unit casts a skill (Summon Clone) but it creates something like 15 clones. Not globally, but in a huge area (something like... 5k aoe). How to make these summoned units cast the skill every second ?

EDIT: Oh I followed you advice and it worked wtf. Ty man
 
Level 11
Joined
Dec 19, 2012
Messages
411
Easiest way would be, add all the unit type you want into a group and pick the group every 2 seconds. You can do it when map is init, but that would not allows you to keep track any unit of the type you want if they are adding into the map via trigger.

The way I would do is, keep track how the unit spawn, after it spawn just add it directly to a unit group.
 
Status
Not open for further replies.
Top