Description

A simple script and demonstration to iterate over ds_maps.

When relying on datastructres heavily in Gamemaker, it becomes very apparent that the native functionality for manipulation leaves a lot more to be desired, and this is one of the staple scripts I import to any project before even thinking of beginning.

Similar to "foreach" in PHP, the script makes a pleasant to look at way of iterating all elements of a map as such:

var i = iter(myMap, true), key, val;

while(iter(i)) {
    key = iterkey(i);
    val = iterval(i);
}

See the included demo object for an in-application use

More Assets:

End User Licence Agreement (EULA).

Version 1.0.0. Published November 28, 2016

Created with GameMaker: Studio v1.99.505

Age Rating: 4+

Average Rating

Your review

You can only review assets you've bought.


Gravatar

Anonymous 05 August 2017

Thanks


Gravatar

Anonymous 05 August 2017

nifty bit of code

Package contents

Total size 3.01 KB

What is the issue?

Back to Top