• 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.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

How to Reduce create unit lag?

Status
Not open for further replies.
Level 10
Joined
Jul 22, 2007
Messages
261
  • Spawn 1
    • Events
      • Time - Every 12.50 seconds of game time
    • Conditions
    • Actions
      • Unit - Create 5 Zombie Mob for Player 12 (Brown) at (Position of Corpse Pile 0002 <gen>) facing Default building facing degrees
      • Wait 1.00 seconds
      • Unit Group - Pick every unit in (Units within 600.00 of (Position of Corpse Pile 0002 <gen>)) and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack-Move To (Position of (Random unit from (Units owned by (Random player from (All allies of Player 1 (Red))) of type Survivor)))
this is mine and its still lags with like 3 of them
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,275
What do you mean by lag... If you mean the game hangs for a second, then that is caused by making too many units at the same point and WC3 failing to displace them correctly.

Secondly that trigger will lag. . . late game atleast due to horriable leaks.

In my green circle TD I create units atmost 8 at a time, and always at locations where there should be no existing units.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,275
1.
  • Unit - Create 5 Zombie Mob for Player 12 (Brown) at (Position of Corpse Pile 0002 <gen>) facing Default building facing degrees
  • Unit Group - Pick every unit in (Units within 600.00 of (Position of Corpse Pile 0002 <gen>)) and do (Actions)
  • Unit - Order (Picked unit) to Attack-Move To (Position of (Random unit from (Units owned by (Random player from (All allies of Player 1 (Red))) of type Survivor)))
All those lines leak objects like locations and groups. If you want to reduce lag fix them.

2. Collision size only will help if the problem you suffer is physical wc3 LAG whereby the framerate drops to 0 momentarily. If it is pathing lag it should do near nothing next to make them more easilly pathable.

3. This will explain the lag if it is actual WC3 hanging, like I said, do not create 5 units at the same point, rather create 1 unit at that point constantly or create the 5 units at nearby but different points.

4. Do not spam, this is a serious place. Go to Something Else if you want a cookie.

5. There are 2 ways. The first way requires you to input the order string of spell (or base spell for custom ones) which works for most spells but some item only spells like the wand of illusion ability can not be used this way. Method 2 requires you to input the raw order ID, only aquirable via a selfmade debug function which displays it for the spell you want cast and doing this works on every order possiable. For both methods you have to make sure you run them with the correct order type inorder for them to work properly. Order types are targeting a point, targeting a widget (unit, item or destructable) and targeting no one (like thunder clap).
 
Level 8
Joined
Apr 6, 2009
Messages
254
http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/basic-memory-leaks-5889/

Here you can learn about leaks. Its about that you dont use variables at all, and dont destroy the location.

http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/variables-5896/

Here you can learn about Variables.

And i think the lag is 99.99% of the massive leaks. Read the toturials. Hope they help.

EDIT:
4. Do not spam, this is a serious place. Go to Something Else if you want a cookie.
Just lolled :D:DD
 
Level 2
Joined
Sep 19, 2008
Messages
24
this is very similar with my problems, i guess the WC3 engine is worse enough to place created units in same X,Y position

does giving exact position (X,Y) for each created unit will reduce this lag?
 
Status
Not open for further replies.
Top