• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Can someone link me/explain how to use integers? {"from integer 1 to 5"}

Status
Not open for further replies.
Level 8
Joined
Aug 1, 2008
Messages
420
I dont really get how to use "from integer 1 to 5 do actions" bit. Is there a tutorial for integers like that? I cant seem to find one, i find it confusing :(
 
Level 4
Joined
Oct 11, 2008
Messages
90
Well, this is basic programming. That thing does 5 steps. For example:
For each integer A from 1 to 5 do
Create a special effect at center of playable map area
Wait 1 second

This works like this: Step 1: a special effect appears in the middle of the map, step 2 the same, ... same for step 5. So this one creates 5 special effects in the middle of the map each between 1 second interval.
 
Level 8
Joined
Nov 9, 2008
Messages
502
Sometimes you need a loop in a loop where both will refer to the loop number (Integer X) therefore you need to differ Integer X ergo Interger A and Integer B.

Loops are great for simplifying a trigger. For example you can take Integer A and use it to refer to a player number which means you can have a trigger to something to all players with a single segment of code instead of individual segments for each player.
 
Level 8
Joined
Aug 1, 2008
Messages
420
So, integers (in this manner) are only used for looping?
and sunyzu7387, i was looking at that just recently :p He didnt explain the integers though, in not much detail.
 
Level 7
Joined
Oct 13, 2008
Messages
301
Well the peeps have already explained it's functions, But from 'A' or from 'B' Differ in simple way; If you have two Loop actions with 'A' At same time, then it will skip the other one / Nulfill it's effect's. So the 'A' and 'B' are so that you can create 2 loops at same time without interrupting the loops.
 
Level 8
Joined
Aug 1, 2008
Messages
420
I kinda asked about loops. I didnt really mean integers, i knew what they are. I just was wondering how "For integer A (etc)" actually does & how to use it. Hard to explain :/
 
Status
Not open for further replies.
Top