Closed DavideRei closed 1 year ago
there was another issue that may be related. I dont find it. But npcs were staying in warmode undef cos combat never ends. I remember I spent a lot of time trying to understand all. I never found the reason.
i don't know if is related, in this case the problem is on players and is not about statf_war. I have to test it between npcs. When the last attacker is deleted from the list, because is killed by melee weapons, @combatEnd doesn't fire.
In the meantime i solved it by script, like this:
ON=@CombatDelete
if (<memoryfind.<src>>) //To remove fight memory linked to the dead npc. Maybe i can check if the attacker is not a player.
memoryfind.<src>.remove
endif
if (<attacker> == 1) //To fire @combatEnd if it's the last attacker
fulltrigger @CombatEnd
endif
Same problem between players, @combatEnd doesn't fire with melee weapons, works is the player is killed by harm spell. The fight memory remains, but i think is ok in this case, because the uid exists.
Betweens npcs (2 zombies) @combatEnd seems to be called twice, and the fight memory is removed. no statf_war flag on the winner zombie.
Possible Fix sent.
It seems to work, thank you
@CombatEnd doesn't fire when a player with attacker > 0 dies, i don't know if it can be related or if it's the desired behavior
for me the memory is still there as "unnamed" even tho NPC dies.
Chec the color flag in the memory, what they are?
It seems to work, thank you
@CombatEnd doesn't fire when a player with attacker > 0 dies, i don't know if it can be related or if it's the desired behavior
Yes it's supposed to be fired when the whole attacker list is going to be cleared
Chec the color flag in the memory, what they are?
one of three monsters memory was deleted, the rest is unnamed. One color flag is 020, second one 0b1.
edit: another attempt both of 2 monsters that died = both of memories deleted :octocat:
Closing as apparently completed and abandoned discussion
Tested with last version and clean script pack
[events e_player_generic_event] //Generic event to all players
ON=@CombatStart say combat start
ON=@CombatEnd say combat end
ON=@CombatAdd say combat add
ON=@CombatDelete say combat delete
.add c_zombie and start the fight
If you kill the zombie with a melee weapon, like i_dagger, @combatEnd doesn't fire. Also if you check the player memories the zombie fight memory is still there (unnamed) linked to a uid that doesn't exists anymore.
If you kill the zombie with magic, like harm, @combatEnd works but there still the memory problem.
Tested with GM account and player account.