Hi, There an UtbS bug [1] which seems to expose some problems in the WML event handling. Cycholka posted a testcase[2] made by Zookeeper.
There are 2 units both with a die event. * Unit 1, Jack, is stored * A third unit kills the second unit, Horsie * The death event of the Horsie runs, kills Horsie and unstores Jack at the same location. Jack death event is also played. What I think occurs is the game_event::fire finds both death events and tries to run them. The handler verifies the filter applies to the location where the event should occur and plays that event. First Hories event is found and played after that Jacks event is tested and Jack is at the wrong time at the wrong place and is presumed dying. So his event is also played. If the definition of the death events are in the opposite order in the scenario file the problem doesn't occur. I expect due to the fact that then Jacks event is tested first, there's no Jack to be found so no event. Can somebody with more knowledge tell me whether my conclusions are valid and also propose the best way to fix it. AFAIK it's allowed for a unit to have more than one death event, so limiting to 1 event being run won't fix the problem. Is what WML does really allowed or is this bending the rules too far and should it be documented on the wiki as not allowed? Regards, Mark de Wever aka Mordante/SkeletonCrew [1] https://gna.org/bugs/index.php?8981 [2] https://gna.org/bugs/download.php?file_id=2265 _______________________________________________ Wesnoth-dev mailing list Wesnoth-dev@gna.org https://mail.gna.org/listinfo/wesnoth-dev