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

[Solved] Hitting OP Limit?

Status
Not open for further replies.
Level 7
Joined
Apr 18, 2010
Messages
102
HI i have question, my spells involve array variables like Spell_Caster[1] to Spell_Caster[16] spread throughout many spells. some have Spell_Duration[x] others spell_Damage[x] (you get the idea) will I hit the OP limit if I continue using this system?

Just a while ago, one of my spell triggers malfunctioned, using a variable Spell_Damage[16] and many more variables, but a latter-made trigger using Spell_Damage[17] works fine. I figured that I hit the OP limit, but when I deleted that variable from the malfunctioning trigger, everything turned out fine again..

Question is, would future spells malfunction?

Next spell should use Spell_something[<18] variables on its triggers.

Also, my spells use a unique cooldown system, making me keep all the spells in check,
like Spell_Ability[1] = Firebolt, Spell_ability[2] = Frost nova, etc..
and a trigger running every second, checks whether the spell is on CD or not,

That trigger has a loop like
for each variable A from 1 to 100
if Spell_Ability[variable A] is on Cooldown
>>>> u get the idea
 

Zwiebelchen

Hosted Project GR
Level 35
Joined
Sep 17, 2009
Messages
7,236
Please don't use so many colors.

The answer to your question really depends on the number of operations (as the name implies).
Generally, looping from 1 to 100 in one go is not a problem if the amount of code in each loop is short.

But the operation limit not only depends on the pure number of operations, but also on how taxing these operations are. Functions like creating units will "consume more" of the operation limit than simple maths operations.


Without showing us the triggers, we can't tell you if you are likely to hit the OP limit or not.

But as a simple rule of thumb: unless you are doing a loop inside a loop, you will mostly be fine.
 
Level 7
Joined
Apr 18, 2010
Messages
102
Ah thank you for your reply good sir, sorry for the colors, thought it would be helpful to highlight key points.

I continued making spells, and I did not reach the OP limit as it turns out..

I used the trigger sleep action command in some of my spells because for some reason I thought that would work (browsing thru the net)...


Anyways problem solved =D
 
Status
Not open for further replies.
Top