Auto-translated
This is getting too complicated. You need to be a programmer, at the very least. The specializations are hardcoded into the program, which, as far as I can tell, isn't even written in Lua.
New here? I'm Roha — want a quick tour?
function AttackerCreatureDeath(unit)
...
end
This is getting too complicated. You need to be a programmer, at the very least. The specializations are hardcoded into the program, which, as far as I know, isn't even written in Lua.
Sure. SetObjectPosition.
SetObjectPosition('hero', GetObjectPosition('city'))
and the hero ends up in the garrison of the city if it's empty.
So, I tried this method, but it doesn't work as expected. Is there another way?
How does it work?
You need to jump into the gates of the enemy city, or into the city itself, if it's your city, even from the gate point.
gate_points = {}
function GetGatePoints()
for i, town in GetObjectNamesByType('TOWN') do
for j, hero in GetObjectNamesByType('HERO') do
if IsHeroInTown(hero, town, 1, 0) then
local x, y, z = GetObjectPosition(hero)
gate_points[town]={x, y, z}
end;
end;
end;
end;No way. And the city should never be empty BEFORE the script runs (that's why it doesn't work).