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

50 or so triggers with same event - concern?

Status
Not open for further replies.
Level 18
Joined
Mar 16, 2008
Messages
721
This map has about 50+ "item craft" triggers with same event. Would that be a cause for concern of lag? Some players complain of lag but I think that's due to their internet not being good. Not 100% sure. Thanks for any feedback.

  • Item Combine x
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • ((Hero manipulating item) is A Hero) Equal to True
      • Or - Any (Conditions) are true
        • Conditions
          • (Item-type of (Item being manipulated)) Equal to ...
          • (Item-type of (Item being manipulated)) Equal to ...
    • Actions
      • ...
 
Last edited:
Level 39
Joined
Feb 27, 2007
Messages
4,994
Probably not an issue. Yes, a lot of duplicate code is being run every time an item is picked up, but almost every one of those triggers is failing at the conditions step and TriggerEvaluate is pretty quick as far as I remember.

You could make it slightly more efficient if all 'combineable' items are flagged as the same item class in the OE (say for example that they're all "Powerup"s or something, idk you can choose). Then your first line of conditions would be Item-class of (manipulated item) equal to Powerup. It might be that the convoluted condition functions that GUI makes would counteract any savings you could gain here, but in general if an single condition fails the engine will stop checking the rest of the conditions because it's pointless.
 
Level 18
Joined
Mar 16, 2008
Messages
721
they don't seem to be causing any lag after detailed test of picking up 6 items quickly.

out of curiosity, do you think it would be worth it to convert these triggers to jass if they were lagging?
 
Status
Not open for further replies.
Top