|
Hi, I’m trying to write a script at the moment that uses a lot of vectors and I’ve run into a scripting issue. I need to work with vector arrays but I can’t seem to access array
elements properly. For example:
This works:
vector $testb = <<1,1,1>>;
print ($testb.x) //Returns: 1
So does this:
vector $test[3] = {<<1,1,1>>,<<2,2,2>>,<<3,3,3>>};
print ($test[2]) //Returns: 3 3 3
However, this doesn’t:
vector $test[3] = {<<1,1,1>>,<<2,2,2>>,<<3,3,3>>};
print ($test[2].x) // Error: print ($test[2].x) //
// Error: Line 2.17: Syntax error //
So my question is - does anyone know how to access vector array elements? How about assigning new values to an element (e.g.: $test[2].x = 4)?
Any help would be greatly appreciated. :)
|