• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Integer A/B question

Status
Not open for further replies.
Level 22
Joined
Nov 14, 2008
Messages
3,256
Hello

Yes I'm a spellmaker and I should know this but I'm just making sure of it now (this may be a huge topic here, very common).

I know integer A/B bugs in the loops, often used and also if you just put a wait in one of them, all of them fucks up litterly. But here's my question. If I've checked that there are no waits in these fucking loops then it should be ok or maybe there is a third bug that crashes the shit down? Cause I'm really tired using another integer mostly indexed 3 or creating another one isntead.

Thought I might continue as I've done so far but just asking for my experience I havent used integer A very much so dunno about the "real" deals if you get my point.
 
Level 13
Joined
Nov 22, 2006
Messages
1,260
There are no bugs with it afaik, even when using waits. You can only be using it in a wrong way. In "for every unit in unit group" actions you can't use waits because they won't work, maybe you mixed those two.

It really helps if you post the code and explain the problem.
 
Level 6
Joined
May 7, 2009
Messages
228
The A and B loops in the trigger editor use a blizzard variable for the loop variable, so if there is a wait inside the loop, and another function alters those blizzard variables, obviously the original loop will get messed up.

Solution: Use Custom Script for the looping
 
Level 13
Joined
Nov 22, 2006
Messages
1,260
That's not a bug. To me a bug is something screwed up that happens for no apparent reason. In this case it's logical that it gets screwed up.

There is no reason to alter those blizzard variables, why would you want that?

Oh yeah...I just figured it out, if there are multiple loops going on, then it gets screwed up. But that's completely logical (if you know JASS).
 

Rmx

Rmx

Level 19
Joined
Aug 27, 2007
Messages
1,164
They does Bug, but not in a way that you are talking about.

They BUG, because they are GLOBALS and if another trigger uses For Loop A or B, then it will BUG, but you can use them like you said NEST them in each other like A - B - C - D and they will not 100% bug if they are not used in another spell that may collide with this spell or system.
 
Level 31
Joined
May 3, 2008
Messages
3,155
They BUG, because they are GLOBALS and if another trigger uses For Loop A or B, then it will BUG, but you can use them like you said NEST them in each other like A - B - C - D and they will not 100% bug if they are not used in another spell that may collide with this spell or system.

Yes, sometimes even if 2 spells use loop A/B without any wait. It could possibly cause a malfunction at either 1 of the 2 spells, it happens before to me.
 

Rmx

Rmx

Level 19
Joined
Aug 27, 2007
Messages
1,164
Why do you use A and B ,,, make a Custom Integer and problem is solved !

Only use A / B .. the following conditions is met...

The spell is instant ... so it is MUI and have a 0.00000000000001% chance to cause bug.

Once in ur map for indexing .. and that's IT.

If you have a system that players are not allowed to cast spells at the same moment ..
 
Level 7
Joined
Mar 8, 2009
Messages
360
if you really want waits inside loop you can do something like this:

  • trigger 1
    • Events
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Trigger - Run trigger 2 <gen> (checking conditions)
  • trigger 2
    • Events
    • Conditions
    • Actions
      • -------- blabla --------
      • Wait 2.00 seconds
      • -------- blabla --------
 
Level 6
Joined
May 7, 2009
Messages
228
That wouldn't have the same affect though, because the wait is in a different thread from the loop, unlike the original.

Your best bet is to just use Custom Script
 
Status
Not open for further replies.
Top