Wintermute Engine Forum
Wintermute Engine => Technical forum => Topic started by: mamajo on December 28, 2011, 01:30:17 PM
-
Hello
I used to take 2D Array, but I do not know how to quote them.
In C++ are to be announced , But how Wintermute ?
//Arrayname [Row subscript][Column subscript]
int MyArray[2][3] = {{1,2,3} , {4,5,6}};
Thank you. :)
-
To initiate an array and populate it
var songs = new Array("1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17");
For an empty array
var already_played = new Array();
-
thanks :)
This is an array that defines you , 1D.
How do we define the 2D Array?
-
There's no 2D Array in WME. But:
you can do this easily with dll (in c++) but 2d arrays is not a real limitation. If you need matrix of any rowsize, you can easily use this 2d to 1d conversion:
2darray[1][2] == 1darray[1*rowsize + 2]
(zero indexed of course)