GMLscripts.com

map_objects

map_objects(map)
Fills a given map data structure with the id values of all object resources, keyed by strings of their names.
COPY
  1. /// map_objects(map)
  2. //
  3. // Fills a given map data structure with the id values of all
  4. // object resources, keyed by strings of their names.
  5. //
  6. // map map data structure, real
  7. //
  8. /// GMLscripts.com/license
  9. {
  10. var no,i,ds_map;
  11. ds_map = argument0;
  12. no = object_add();
  13. object_delete(no);
  14. for (i=0; i<no; i+=1) {
  15. if (object_exists(i)) {
  16. ds_map_add(ds_map,object_get_name(i),i);
  17. }
  18. }
  19. return 0;
  20. }

Contributors: paul23

GitHub: View · Commits · Blame · Raw