Multi-Dimensional Arrays with St...

by Glen

Game Maker doesn't natively support the use of arrays beyond 2 dimensions, ex: array[1,2,]. I've developed a script that allows you to manage information from a in a format similar to array[1,2,3] for those who wish to make use of 1-14 Dimensional arrays. It's one script and can be used to create, set, and retrieve array values. It also supports strings in arrays. For example, you can set and retrieve value in this fashion:

equipment["weapons","machinegun" ,"bullets"] = 10;

I've also included the scripts for normal real number arrays: equipment[1,2,3,4,5] = 10. Using the scripts I've provided, the structures above are now possible in gamemaker without the use of a DLL. Give it a shot and let me know if you find a bug or limitation. I've provided many comments on how to use the scripts and a quick demo.

Tags: arrays

Download
Released 2012-03-28
Category Other
Rating 3.0 (by 2 users)
Downloads 27
Version 2
ID 196672
Slug multi-dimensional-arrays-with-string-support