Skip to content
#1159
Auto-translated
I'm not sure, but I found these examples of how it can be used:
Okay, I figured this one out. It takes names like BUILDING_ABANDONED_MINE, TOWN_NECROMANCY, and CREATURE_GENIE as arguments. They need to be enclosed in quotes; otherwise, the command won't work.

The function returns an array filled with adventure map references: a name if the object has one, otherwise its generic name, like "1-210-199-AdvMapDwelling-27624." You can refer to this by using the array index. For instance:

Imp_Cruc_Array=GetObjectNamesByType("BUILDING_IMP_CRUCIBLE");
GetObjectNamesByType('TOWN') - all towns on the map
GetObjectNamesByType('TOWN_DUNGEON') - all dungeon towns
GetObjectNamesByType('BUILDING_WITCH_HUT') - all witch huts.

It seems to search by a string prefix, because

GetObjectNamesByType('BUILDING_WITCH') and GetObjectNamesByType('BUILDING_WIT') give the same results as
GetObjectNamesByType('BUILDING_WITCH_HUT').
Is it really impossible to do this with such a wide variety of objects? Or could we try to output all static objects and then select those that return something meaningful with GetObjectCreatures?

Statistics

Welcome our newest member: Emil