Skip to content
#3685
Auto-translated
Another question. How can I track the results of a battle with neutral monsters? I need a script for Heroes 1 that would check whether certain monsters died or survived after a battle, and depending on the result, allow me to destroy, say, a REGION_ENTER_AND_STOP_TRIGGER, or leave it intact. I'm trying to create guardians for teleporters, and given that I already have a huge number of these teleporters, writing a separate quest for each neutral monster would overload the game. If I create a sudden battle, how can I record the results after:

function guard_Tilgatal_battle_F(heroname)
local player = GetObjectOwner(heroname)
if(player == 1) then
StartCombat(heroname, nil, 3, 80, 12, 158, 5, 142, 12, nil, nil, nil);



And if these monsters are standing on the map, I don't even know where to attach the script. To the monsters themselves? It's unclear what to write. I tried to do something with COMBAT_RESULTS_TRIGGER, but I don't understand how it works, and I don't understand at all whether it can be applied to monsters, and not to heroes.

Statistics

Welcome our newest member: artem