# For each intiger A and B

#### Gost

Level 10

• For each (Integer A) from 1 to 12, do (Actions)
• Loop - Actions
• Set Caster_Bloodlust[1] = (Casting unit)
Would it set Caster_Bloodlust[1-12] to casting unit?

EDIT: Or would this set Caster_Bloodlust[1-12] to casting unit?

• For each (Integer A) from 1 to 12, do (Actions)
• Loop - Actions
• Set Caster_Bloodlust[(Integer A)] = (Casting unit)

#### Ham Ham

Level 10
This will make for 1 to 12 times set the bloodlust caster the casting unit.

#### Gost

Level 10
I dont understrand what you just said.
I have a variable "Caster_Bloodlust" it is an array (size 12) i want it to set Caster_Bloodlust[1]
Caster_Bloodlust[2]
Caster_Bloodlust[3]
Caster_Bloodlust[4]
Caster_Bloodlust[5]
Caster_Bloodlust[6]
Caster_Bloodlust[7]
Caster_Bloodlust[8]
Caster_Bloodlust[9]
Caster_Bloodlust[10]
Caster_Bloodlust[11]
Caster_Bloodlust[12]
All to Casting Unit, will the second or first code, or niether do this?

#### L_believer

Level 4
The second trigger works, the first will only command caster_bloodlust [1]

Anyway, for what purpose you use these trigger?? I don't remember if Bloodlust stuck with others

#### Eleandor

Level 21
if this is what you want to do:

Whenever someone casts Bloodlust, this unit should be added to the unit variable, and the 1 - 12 will stand for the player number of the owner of the unit

then this trigger will do fine:

Events:
a unit finishes casting an ability
Conditions:
ability being cast = bloodlust
Actions: Set Bloodlust_Caster[Player number of (owner of (casting unit) )] = casting unit

In your trigger, you take those 12 variables in the array and assign it the same unit... Thus, you don't need an array of 12 but an array of 1 because all 12 variables will result in the same unit.

Is that clear?

Replies
5
Views
480
Replies
7
Views
580
Replies
5
Views
679
Replies
2
Views
474
Replies
4
Views
921