Skip to content

NHF – new heroes for Heroes V 3.1.

User Avatar
#2189
Auto-translated
I can't check it right now. These lines raise some questions for me: ``` local x,y,p = 0; if IsObjectExists("Olhar") == true then x,y,p = GetObjectPosition("Olhar"); end; if GetHeroTown("Olhar") ~= nil then p = 1; end; ``` 1. `local x, y, p = 0;` is equivalent to: ``` local x = 0 local y = nil local p = nil ``` and not: ``` local x = 0 local y = 0 local p = 0 ``` 2. In a function that is only called for a living hero, its existence is checked in a non-trivial way (using `IsHeroAlive`). Why? 3. The function that provides the town's name instead of the hero's name (when the hero is in the town) is not used, which could lead to an error in `GetObjectPosition`. P.S. I checked it using build 76.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

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