Custom data structure?

T

TDSrock

Guest
You could make an object. Then make a script, the script creates the object and fills it with the data. Quick example:

Assume I have created an obj called Data_obj
Code:
//script name: declare_obj
//params: 2d-array
inst = instance_create(0,0,Data_obj);
inst.data = argument[0]; //update this after the comment from Hisi012
Now I could do the following presuming the proper array is stored and I obtain the proper instance of Data_obj.

Code:
data_inst.aray[2][4]; 
//Fetches data from slot 2 4 from the Data instance array which is stored as data_inst(which is not clarified how it is defined here)
Now is this really useful?
I think not. First of this will be slow. Second the built in datastructers are perfectly fine for most uses if need be you could construct a heap with the built in datastructers.
 
Last edited by a moderator:
Top