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

Loop

Status
Not open for further replies.
Level 19
Joined
Aug 8, 2007
Messages
2,765
sure trigger - actions - generals - for each integer

the only difference to world edit is that you need a global variable and it is possible to set the increment.

the loop is also in trigger - actions - general

just combinate both

no, Integer A and Integer B are presets i think..

and also, idk if this glitch is still from the beta, but you have to search for it in the search bar, it isnt in the categories.
 
Level 1
Joined
Feb 24, 2010
Messages
62
There's a 'Pick each integer' action in the 'General' section, which uses an inbuilt integer called 'Picked integer' when using it. There's only one of these, though, so if using multiple of these in one loop, you'll have to use 'For each integer'.

Besides, you can also use local variables for the 'For each integer' loop, which is also better.
 
Level 11
Joined
Aug 1, 2009
Messages
963
Don't use the for loop. Last time I checked, it was screwed up and would duplicate all of your actions inside said loop, stupidly inefficient.

Use a while(variable<=max) loop instead, and increment the variable at the end of each loop. :eek:
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
Don't use the for loop. Last time I checked, it was screwed up and would duplicate all of your actions inside said loop, stupidly inefficient.

Use a while(variable<=max) loop instead, and increment the variable at the end of each loop. :eek:

Ive been trying that and experiancing problems, (rough numbers here) it has a 85% chance to work and if that 15% falls thru and it fails, the trigger doesnt work again. using it for an auto-attack trigger and it gets annoying.
 
Level 5
Joined
Jul 10, 2010
Messages
124
make it like I did in this action definition, it is a local var called "Loop A"

Ignore the red text, I was asking a question about it in my other thread

attachment.php
 
Status
Not open for further replies.
Top