Kill Monster map action - units aren't actually killed?
Makes sense - it is definitely a broken (i.e. unfinished) film.
Thought it was interesting though that it does show the unit dying at the center, which is a little more than 90 seconds in - yet never shows the units even leaving home. Must be the way unit movement is stored in the film (i.e. vectors, etc.).
Funky.
Thought it was interesting though that it does show the unit dying at the center, which is a little more than 90 seconds in - yet never shows the units even leaving home. Must be the way unit movement is stored in the film (i.e. vectors, etc.).
Funky.
Okay, I've looked at this, and the problem lies with the REMOVE MONSTER action, which really SHOULD NEVER BE USED.
Comments next to the original bungie code say this:
Basically, it makes a single call in the code ("delete_monster") as well as adjusting damage stats (responsible for all the player's %'s and such), and calls it a day. This has two issues. First, delete_monster should NOT be called without doing a lot of extra work to make sure nothing else references this monster.
This is what kill_monster does (it removes all references to the monster, and then calls delete_monster too). In your case, delete_monster actually ends up being called twice (once for remove monster, and once for kill monster), which seriously messes up the integrity of the game. Basically, don't use REMOVE MONSTER.
However, the fact that KILL MONSTER wasn't adjusting the stats is IMHO a bug, and I'm fixing it for the 1.5.2 release. So you should be fine with just using kill monster, and it will work as intended when 1.5.2 ships.
And don't forget, DO NOT USE REMOVE MONSTER. [/color]
Edited By Myrd on 1138253298
Comments next to the original bungie code say this:
Code: Select all
// THIS IS VERY DANGEROUS BECAUSE IF WE DELETE A MONSTER WHICH IS ALREADY IN A SPATIAL
// THE ATTACK AI WILL CALL GET_MONSTER_DATA ON NONE (which is why this parameter is
// undocumented)
This is what kill_monster does (it removes all references to the monster, and then calls delete_monster too). In your case, delete_monster actually ends up being called twice (once for remove monster, and once for kill monster), which seriously messes up the integrity of the game. Basically, don't use REMOVE MONSTER.
However, the fact that KILL MONSTER wasn't adjusting the stats is IMHO a bug, and I'm fixing it for the 1.5.2 release. So you should be fine with just using kill monster, and it will work as intended when 1.5.2 ships.
And don't forget, DO NOT USE REMOVE MONSTER. [/color]
Edited By Myrd on 1138253298
Makes sense.
I just ran the map again and instead of attacking the unit with the Dwarves I simply put a Ghol right next to the unit and taunted until the center unit died.
It froze.
I wonder if it's something along the lines of "any activity" right where the unit dies? No idea but interesting that it wasn't an attack in the same cell (or very near the same cell).
I just ran the map again and instead of attacking the unit with the Dwarves I simply put a Ghol right next to the unit and taunted until the center unit died.
It froze.
I wonder if it's something along the lines of "any activity" right where the unit dies? No idea but interesting that it wasn't an attack in the same cell (or very near the same cell).
(My last post slipped in there before I saw that you had posted your excellent explanation)
Sounds perfect, Myrd. I couldn't figure out why Kill Monster wasn't doing the delete and it didn't really make sense to me to do the delete as well because it seemed like I would be deleting "nothing" (a no-longer-existing monster). Sounds like that's precisely what was happening!
So I'll just use the Kill Monster action and all will be well in 1.5.2. Sweet! Thanks for checking this and putting in the internal deletion!
... any chance the "Don't Auto-Adjust (Floyn) Player Colors" checkbox could make it in there at the same time? :;):
:: Sound of Myrd laughing hysterically ::
.
Sounds perfect, Myrd. I couldn't figure out why Kill Monster wasn't doing the delete and it didn't really make sense to me to do the delete as well because it seemed like I would be deleting "nothing" (a no-longer-existing monster). Sounds like that's precisely what was happening!
So I'll just use the Kill Monster action and all will be well in 1.5.2. Sweet! Thanks for checking this and putting in the internal deletion!
... any chance the "Don't Auto-Adjust (Floyn) Player Colors" checkbox could make it in there at the same time? :;):
:: Sound of Myrd laughing hysterically ::
.
Ok then what would be the proper way to do what I want with it - namely to Kill Monster and have it deleted?
Should I kill the monster and then have that map action activate another one on success that does the delete?
Sounds to me like the way you use it means it should be left alone and not changed for 1.5.2 - which is absolutely a-ok with me - I just want to know if there is a proper way for me to use it to actually kill the monster off 100%.
Should I kill the monster and then have that map action activate another one on success that does the delete?
Sounds to me like the way you use it means it should be left alone and not changed for 1.5.2 - which is absolutely a-ok with me - I just want to know if there is a proper way for me to use it to actually kill the monster off 100%.
Wait a sec... one of the bugs I thought was something else may very well have to do with this "KILL MONSTER" map action or at least adding to it. At the end of my co-op... even if all units are dead I still show that I have a percentage left...hmmmmm think this is why?
I bet it is - this is precisely what I am seeing in multiplayer and part of why I started this thread. When I Kill Monster it doesn't adjust my % so killing off the rest of my team leaves me still alive with no units - which is a tad awkward... :;):
Baak: Unfortunately, I'm going to have to change the fix to require both Kill Monsters and Delete Monsters map actions to be present to make it so %s are adjusted. This will be visible in Build 271 and onwards.
I will keep the old buggy functionality of Kill Monsters as-is (that is, not adjusting percentages), because I was made aware that some plugins rely on it, and I don't want to break them. And the new functionality will only take effect when you use both Kill Monsters and Delete Monsters (like your initial plugin did, except this time it won't freeze).
So disregard my previous instructions, and feel free to use Delete Monsters when its in combination with Kill Monsters, and it will work the way you want it to from Build 271 and onwards. (Build 271 isn't out yet as of this post, however)
Edited By Myrd on 1138735557
I will keep the old buggy functionality of Kill Monsters as-is (that is, not adjusting percentages), because I was made aware that some plugins rely on it, and I don't want to break them. And the new functionality will only take effect when you use both Kill Monsters and Delete Monsters (like your initial plugin did, except this time it won't freeze).
So disregard my previous instructions, and feel free to use Delete Monsters when its in combination with Kill Monsters, and it will work the way you want it to from Build 271 and onwards. (Build 271 isn't out yet as of this post, however)
Edited By Myrd on 1138735557