For In Loop Fills all values in arrays problem

Return from my past questions…
I have a problem with assigning values on unassigned array values. When i’m trying to make for in loops, the script assigned same values on all arrays. Now my question is, how to make the script just assign one values in an array and then it will assign another values later.

This script i use for assigning ‘used’ values on an arrays, so if one objects exploded it will assign just one ‘true’ on one array, not all arrays.

This is my script. it’s simplified.

rs is RegSaver.js, usedObj is Boolean, isExploded is boolean (used when an object exploded), and RegisterThis Function added in function Update if the object has exploded (if(isExplode) RegisterThis)

function RegisterThis(){
	for(var i : int = 0; i < rs.usedObj.length; i++){
		if(isExploded && rs.usedObj *== true){*

_ rs.usedObj = isExploded;_
* }*
* }*
}
I hope it’s not too hard. Thanks for the answer. i really need this script
![alt text][1]
[1]: https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-snc7/375975_2245973003807_1682628822_1606501_1335652944_n.jpg

I'm not sure at all yet on what you are trying to implement, COLLAnitySV, but I would try to give you an answer. Sorry if it will miss your intentions.

"When i'm trying to make for in loops, the script assigned same values on all arrays"

First of all, I think that you are messing up some terminology: when you talk about "arrays", you are thinking about "array's elements", don't you? Because you just have a single array, that's usedObj.

Then, I think that you want enable these array's elements one at a time, in an incremental way. In that case, you have to hack "i" variable to directly skip the remaining iterations of the loop:

function RegisterThis(){
    for(var i : int = 0; i < rs.usedObj.length; i++){
       if(isExploded && rs.usedObj *== true){*
 _rs.usedObj *= isExploded;*_
 _*i = (rs.usedObj.lenght) + 1;*_
 _*}*_
 _*}*_
_*}*_
_*```*_
_*<p>I repeat, I've many doubts about the desired behaviour of your script. Sorry if I miss that.</p>*_

I may be misunderstanding the question, but if you only want 1 element set to true, why use a loop to loop through all elements of the array? Why not just pass the index that you want set? Something like this…

function RegisterThis(var i){
    if(isExploded && rs.usedObj *== true){*

rs.usedObj = isExploded;
}
}
-Larry