Skip to content
User Avatar
#3535
Auto-translated
look, firstly, in the xdb file of the script, you didn't specify the path to the lua file. That is, even if the path was specified correctly, the script would not run. The problem with specifying an adequate path is quite tricky, because SetHeroCombatScript, unlike many other functions, requires an explicit indication of the initial slash, even if you use the GetMapDataPath() function. That is, the correct script will be like this:
path = '/'..GetMapDataPath()
main_hero = 'Raelag'
print("The main character is named");

SetHeroCombatScript('Raelag', path.."CombatScript.xdb#xpointer(/Script)");
print("combat script started");
and in addition, there are typos in the names of functions in the combat script, and the targets for casts are not specified in the UnitCastAimedSpell function. Here is your map with fixed paths, but in order for Raelag to cast spells correctly, you need to define who these spells should be cast on.
Attachments 1
1 file attached • Total size: 16.3 KB
Нет войне.