New function: region_find2()

Posted By: Superku

New function: region_find2() - 10/07/15 16:25

I use WED regions and lite-C region functionality pretty much all the time and I know of some other users who do so, too.
Currently, when you have overlapping regions for different purposes (such as pathfinding, triggers, sound or enemy areas, ...) region_find() does not bring you very far at it only returns one of them (assuming the position is contained in those regions). I suggest to add a new function:

Code:
region_find2(STRING* name, STRING* filter/ prefix, var num, VECTOR* pos)



The function only searches for regions starting with "filter", like "reg_pf_" or something like that. "num" can be used to find more regions at the same position instead of only the first region by incrementing "num" and calling the function repeatedly, similar to region_get().

Additionally, region_find2() may need another var* parameter or a var return value (or a global variable set) as region_find() does not return the number of the region when there are more regions with the same name - which is quite inconvenient (for subsequent region_get() calls)!

Thanks for your time.


EDIT: I just wanted to write a workaround function/ system but I cannot get the names of all regions in the level, right? I can get the number and dimensions via region_get() but apparently not the names.
Posted By: Superku

Re: New function: region_find2() - 11/06/15 16:22

Shameless but hopeful bump!
Posted By: Anonymous

Re: New function: region_find2() - 11/07/15 22:03

+1
Posted By: Kartoffel

Re: New function: region_find2() - 11/08/15 15:33

I guess none of the devs checks this subforum frequently.
Posted By: 3run

Re: New function: region_find2() - 11/09/15 07:53

Originally Posted By: Kartoffel
I guess none of the devs checks this subforum frequently.
in fact, there is only one dev... jcl cry
Posted By: Wjbender

Re: New function: region_find2() - 11/09/15 10:41

hi superku .

I have suggested to jcl before ,that a list for regions would be helpfull , like the list for entities .

developer's dont see the need for certain features and updates as we users do , because they dont have to use their software and see the actual difficulties and needs of certain things.

that's just my opinion , anyway I have moved on to other engines , so I don't really care that much anymore ,but I still have my gamestudio ready if I need it so I would still like to see such improvements.
Posted By: Superku

Re: New function: region_find2() - 11/09/15 11:07

Yes some access to more hidden stuff like the regions or (EDIT:) the ABT would be great.
© 2024 lite-C Forums