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

Upgrade...Help!

Status
Not open for further replies.
Level 6
Joined
Oct 25, 2018
Messages
108
Hi. Reach the op limit. So I would like to know how I could exemplify the next trigger.

I need that when any player develops an update that we will call "Level 2" change an item of Arma type, to another of Weapon Level 2, of the inventory of any hero that is owned by the player that is investigating. I need to do this WITHOUT USING VARIABLES .... since the op. limit does not allow me to do more and certain triggers are deactivated when trying to include them ...
 
Level 6
Joined
Oct 25, 2018
Messages
108
Buddy the op limit is like 30,000 operations, no way what you're doing is hitting that. Variables have nothing to do with it and actually significantly reduce the number of function calls used by GUI.
Reach the OP. Limit ... my map weighs 120 MB, and has more than 8000 triggers and 1270 variables ... I need to know if you can do what I ask ...
 
With or without variables, this is doable. There's an event specifically made for responding to upgrades :
A Unit Finishes Research

Then, for the condition, detect if it's the research needed. Afterward, iterate every hero on the map owned by a player and check their items if it's the one to replace. If so, replace it.

---
as for the op limit issue, I'm sure it's not related with variables at all. You just need to make sure no trigger actually hitting the limit in one execution (usually happened to map init triggers). Unless we talk about variable limit.

I do have to question the efficiency of the variables if you have tons of them and having thousands of triggers.
 
Status
Not open for further replies.
Top