Tutorial Loop

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
Introduction
This tutorial will helps newbies and also expert <needed?> to know how loop works with.

Tools Needed Before Starting
A function-able World Editor

LOOP
Loop can be found in any unit picking or looping...

First
I will talk about
Code:
For each (Integer A) from 1 to 10, do (Actions)
    Loop - Actions

What do this do ? @@?
This is a normal integer loop for GUI user.

What does it do ?
yeah...it does alot things...but it also cant do most of the things..
This action is the BEST for mapper that need to make tons of same action but change the integer slightly..

Now, For each integer A
Which means the integer will be keep replacing its integer.
*Note that Integer A is being like an integer variable*

from 1 to 10
This will be the number for IntegerA is being replace.
And it also stat out that this loop runs 10 times.
when the 1st time runs, integerA equal to 1
When 7th time runs, integerA equal to 7...Understand?

*Remember NOT to put the 2nd number bigger than the 1st number..it will cause the action to malfunction*
This is not required:
Code:
For each (Integer A) from 10 to 1, do (Actions)
    Loop - Actions


Second


Code:
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
    Loop - Actions

Now...We move to UnitGroup action...
This is easier when u know what ForEachIntegerA do...

As we seen, the action pick every unit in PlayableMapArea...And loop action
Actually this is similar to the last thing we learn..(Integer Loop)
The only different thing is:
-We dont know how many time will it loops

I use back the Action i posted for example:
Code:
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
    Loop - Actions
If the playable map area contains 10 units, The action will pick all 10 units...
And what the Loop-Actions do?
Well, It runs all the action below it 10 times continuosly...The time for the loop run is equal to the unit picked...

Here i will give another examples:
Code:
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
    Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Picked unit) Equal to (Triggering unit)
            Then - Actions
                Game - Display to (All players) the text: Help !!
            Else - Actions

This action, it will loop through all the units in playable map area (Means run <The number of picked unit> times).
If there are 10 units in it, and the 8th unit is Triggering unit...The Loop will runs for 10 time but when the 8th time it run, it show up the word ''Help!!''...
Clear


Here's a example map for everyone to understand loop more clearly:
View attachment 9988
__________________________________________
This is my first tutorial...Please forgive me if there are any mistake...Thanks !!
Be Happy~
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
yea..it is short...
bcoz I duno how to write a nice tut as it is my first tut...
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
=.=...sry ya...
I know jass loop can do it untill like
Code:
exitwhen booleanA == true

but i am a jass idiot...cant do it...sorry =.=
 
Reaction score
456
The but was just about the Jass loops ;)

Ah.. I thought that you were quite good in Jass.. I think I mixed you up with someone else ;D!
 

Sim

Forum Administrator
Staff member
Reaction score
534
[thread=49870]Explanation of Loops by IKilledKEnny[/thread]

It is more complete, unfortunately.
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
>uberplayer

Yeah i think so -_-

>Daxtreme
Then just deleted this tut -_-''
Nothing is better than that
 

elmstfreddie

The Finglonger
Reaction score
203
Q: What’s this tutorial?
A: It’s a short tutorial I made to explain what Loops are. Only new users could find that helpful, but if you know what loops are you can continue reading anyway, just for the fun. Who knows, you might actually learn something!
LOL I found that in kenny's tutorial.
If THAT one is short, then what is THIS one? :p

However deleting is not smart, long tutorials are more of a pain in my opinion. The shorter the better, less time required to read it.
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
as everyone's opinion is that mine is toooooooooooooo short ==''
__________________________
That is short..:lol:
This is shorter XD
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
You are supposed not to bump your post more frequently than once a day.


As for the tutorial, it's short and informative, although, much is still needed to fully be approved by moderator or upper.


I mean, the title of the tutorial is "Loops", but you only explain loops in GUI. What about more advanced ones, which don't deal only with integers, as in, JASS ones?

By the way, "Wait for a condition" is a loop, too. :rolleyes:
 

PurgeandFire

zxcvmkgdfg
Reaction score
508
I agree with Andrewgosu. Also, try to make it detailed and more organized. To get it in the repository, someone has to rate it and I think it has to have a couple of votes. :)
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
Arh...i shouldnt be a person who would write a tutorial...forgive my noobness...
It is so hard to walk in the garden...><
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
890
> It is so hard to walk in the garden..

What do you mean by that?

Anyway, this tutorial has some good information, but it is short, and most of that info can be found in other tutorials.
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
> It is so hard to walk in the garden..
it is some word that someone taught me..
if it is easy to walk in the gardern means the thing is easy
If it is hard to walk in the garden means the thing is hard or difficult

>>Anyway, this tutorial has some good information, but it is short, and most of that info can be found in other tutorials.

I wonder everyone says this is so useless as it is so short
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
890
> if it is easy to walk in the gardern means the thing is easy

I think you're talking about the expression "a walk in the park." So, to say that something is difficult, you would say, "That was no walk in the park." :D

Well, why don't you give some trigger examples where you can use integer loops? Where would a loop be useful? It would also help to elaborate a little more, as your current explanation is a little vague.
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
i try to get some information in it as i can...


.....
yeah my english are bad..>.<
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top