Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Where find all macros working with array?

(Sorry for my bad english, I will do my best for be clear)
sorry for that stupid question, but I don't find a place where is listed all the macros I can use with the array.
I try to make a array for my game, and I have try a lot of thing, but that I wish to know if is a better way to do it.

here my code:

1)Set the 2 array (1 for the member of the team and 1 for the lost member of the team)
Active team : (set: $equipeActive = (array:[" Phel'Etanee"],[" Talze'Likamee"],[" Valu'Telfangee"],[" Yoka'Ytanamee"],[" Mahlo'Turagg"],[" Voro'Neyuree"]))$equipeActive

Team member lost: (set: $guerrierPerdu = [])$guerrierPerdu


2)When I lost a member of my active team, I want to remove the first member of the team and add it in the array of the lost member
move the first member in a tempory variable: (move: $equipeActive's 1st into $guerrierAajouter)

add it in the lost member array:(set:$guerrierPerdu+=$guerrierAajouter)

3)When I "win" or get back one of the lost member, I want to remove it from the array of the lost member and add it in the active team array.
move the first member in a tempory variable:(move: $guerrierPerdu's 1st into $guerrierAajouter)

add it in the active team array.(set:$trash=$equipeActive.push($guerrierAajouter))

4)When I get back a specifique member, I want find it in the lost member array, remove it from the lost array and add it in the active team array.
find the index of the member and store it in a tempory variable: (set:$index=$guerrierPerdu.indexOf(" Valu'Telfangee"))

add 1 to the index, cause array start at 0(set:$index+=$index)

move the member in a tempory variable(move:$guerrierPerdu's $index into $guerrierAajouter)

add it in the active team array.(set:$trash=$equipeActive.push($guerrierAajouter))

I want to remove the $trash variable and the other tempory variable if is possible, and if some body can explain me, why I have to use 2 different way for do the same thing. (I method for move Active team into Team member lost and another for do the contrary)

Thanks for the help. ^^
sorry again for my poor english.
Sign In or Register to comment.