Autor Tema: get image by name (from fpg)  (Leído 7046 veces)


  • Full Member
  • ***
  • Mensajes: 123
  • Karma: 3
get image by name (from fpg)
« en: Julio 24, 2015, 08:41:16 pm »

Hi.I suggest a function that returns the graph number from the name of it (the name you can see in the FPg editor).
For exemple :

graph = "my_graph_name";

Bennu automatically search the identifier of the graph in the GIF assigned to the process.

Wouldn't that be wonderful? :)
My game developer instagram :


  • Administrator
  • *****
  • Mensajes: 2283
  • Karma: 82
Re:get image by name (from fpg)
« Respuesta #1 en: Julio 24, 2015, 11:49:38 pm »
It could be, but it could also be terrifyingly slow and unoptimized.

If you're interested in something like that, I recommend you to create a function to sort it out.

It would be something like this:
Código: [Seleccionar]
function graph_me(int file,string name);
 from x=1 to 999;
    return x;
 return 0;

Process something();

But.... there's no function to retrieve the name of the graphic from the FPG, so that way won't directly work (I think)


  • Administrator
  • *****
  • Mensajes: 13008
  • Karma: 379
Re:get image by name (from fpg)
« Respuesta #2 en: Julio 28, 2015, 01:25:14 pm »
maybe a function like "map_get_by_name" or "map_get" or "map_find", that use "name" as parameter...
Download Lastest BennuGD Release: