|
I've asked this question before, but I still can't really figure it out. Arrays are one of my biggest weaknesses. I've got an array with objects in it. I want another array to store their Z positions, so later on I can move them back to those positions. I can't figure out how to do this, if someone could make an example script, that would be awesome. Thanks in advance, Daan
(comments are locked)
|
|
I hope you are trying this. Try this: } But that means I'll manually take every single item in the array, which kinda beats the function of an array, right? If have threehundred objects in that array... I must copy that line threehundred times... That doesn't seem effecient.
May 23 '12 at 09:29 AM
Danzou
Then you have to use a for-loop like this: I do not know the name in Javascript, but there should be a field that tells you the length of your array. :)
May 23 '12 at 09:38 AM
senad
I believe arrays in JavaScript are completely different, so I don't really know how to convert this =P
May 23 '12 at 10:00 AM
Danzou
What do you want to convert this to?
May 23 '12 at 10:01 AM
venkspower
Well I'd like to implement this in my main script, which is in JavaScript.
May 23 '12 at 05:50 PM
Danzou
(comments are locked)
|
