Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога
Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
New here? I'm Roha — want a quick tour?
RedHeavenHero, could you explain it, maybe I'll understand better... you were able to explain things to me clearly before...
I noticed a 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 bug in the developers' code?
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?
I don't understand why print and similar commands are even needed.
I called the team from the console, created a treasure, saw that it appeared on the map, and then checked its presence using the print command.
RedHeavenHero, so I know part of the name, everything except the large number? All that remains is to figure out if Lua can analyze the contents of strings.
The essence of the task is as follows: a treasure is generated periodically in a certain place. If the player has not yet picked up the previous one, a new one should not be generated. Accordingly, I planned to check for its presence by script name.
I called the team using the console, created a treasure, saw that it appeared on the map, and then checked its presence using the print command.
RedHeavenHero, so I know part of the name, everything except the large number? All that remains is to figure out if Lua can analyze the contents of strings.
The essence of the task is as follows: a treasure is generated periodically in a certain location. If the player has not yet picked up the previous one, a new one should not be generated. Accordingly, I planned to check for its presence by script name.
Analyze strings??? What do you mean?