Page 2 of 3
Posted: Wed Jan 25, 2006 10:51 pm
by Baak
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.
Posted: Wed Jan 25, 2006 11:37 pm
by Myrd
unit dying is due to script, which comes from the map, and not from the saved film data
Posted: Thu Jan 26, 2006 12:26 am
by Myrd
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:
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)
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
Posted: Thu Jan 26, 2006 12:27 am
by Baak
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).
Posted: Thu Jan 26, 2006 12:29 am
by Myrd
Just don't use REMOVE MONSTER and you'll be fine!
Posted: Thu Jan 26, 2006 12:57 am
by Baak
(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 ::
.
Posted: Thu Jan 26, 2006 5:04 pm
by ozone
hmmm I use kill monster as it is now. I hope I can still use it as it works now..?.
Posted: Thu Jan 26, 2006 10:24 pm
by Myrd
The only difference is it will update the player scores (as it should when a unit dies), when it wouldn't before. Do you think it will break anything that people have created in the past? I don't see why it should...
Posted: Thu Jan 26, 2006 10:38 pm
by Baak
My feeling is most people were using Kill Monster for "the enemy" on solo levels and thus were never seeing the problem of stats not being updated for multiplayer.
I could be wrong but I imagine it's fairly rare to do the kind of thing I'm doing with it.
Posted: Thu Jan 26, 2006 10:45 pm
by ozone
I use it for cheats I have...it kills your whole team and changes the units to somethign else but your unit% doesnt change. This is why I like the feature. I can kill my whole team and it doesnt count as units lost. This is the way it was intended when it was added I believe.
Posted: Thu Jan 26, 2006 10:58 pm
by Baak
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%.
Posted: Thu Jan 26, 2006 11:04 pm
by ozone
we should talk Baak...can you come to udog HL or read the PM im sending you and find me on aim/ichat. Maybe I can change the way Im doing things...Im not against it. IMO there are other problems and oddities with unit percentages that should also be fixed...
Posted: Thu Jan 26, 2006 11:12 pm
by ozone
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?
Posted: Thu Jan 26, 2006 11:22 pm
by Baak
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... :;):
Posted: Tue Jan 31, 2006 2:24 pm
by Myrd
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