Skip to content
User Avatar
#2647
Auto-translated
What should be the path to the standard icon in the corner?
There isn't a standard one, but here's an example, like the one in the MessageBox:
'/UI/MessageBox/Message.xdb#xpointer(/Texture)'
Although, it's nicer to put some faces there, for example, one of the heroes from the Academy:
'/Textures/Icons/Heroes/Academy/Academy_Zehir_128x128.(Texture).xdb#xpointer(/Texture)'
And how do you determine the hero who activated all this and will receive the reward in the final function?
TalkBox is for the player, so the hero's name isn't involved in it. But if it's called when entering a building or interacting with a creature, then all three touch triggers pass the hero's name; you can remember it and use it later.
GetAttackerCreatures returns the creatures on the attacking side... but how exactly do you use this to refer to a specific stack?
local units = GetAttackerCreatures();
for i, unit in units do
local unit_id = GetCreatureType(unit);
-- you can also get the number of creatures, coordinates, etc. using the unit name.
end