Skip to content

Current questions and answers regarding the map editor.

User Avatar
#2896
Auto-translated
Jack_of_shadows
I noticed this peculiarity: when I create a treasure with a specific scripted name:

CreateTreasure('some_name', TREASURE_CHEST, 10, 111, 118, GROUND, 0)

and then try to access it using that name:

print(IsObjectExists('some_name'))

it returns nil, meaning it doesn't find an object with that name, even though the treasure itself appears on the map. In a similar function, CreateStatic, everything works as expected. Is this a misunderstanding on my part, or a developer error?
This is their error. When a resource is created, the name given in the function is not assigned to it; instead, it is assigned a default name:
"floor_number-x_coordinate-y_coordinate--some_large_number"
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4