| 04-04-2004, 04:41 AM | #1 |
- delete me - me = thread, not me as in my account... :D |
| 04-04-2004, 05:19 AM | #2 | |
Quote:
event: a unit dies set killingunitvar = ownerof(killingunit) //this is a string var set dyingunitvar = ownerof(dyingunit) // this is a string var if owner of killing unit = player 1 red then set killingunitvar = |colorcode + killingunitvar + |r if owner of dying unit = player 1 red then set killing unit var = |colorcode + dyingunitvar + |r ...goes on for all of the twelve players Game Display To (All Players) The message: killingunitvar + "has killed" + dyingunitvar ^ those r my trigz the problem only happens when a unit is attacked by two people and it dies. if a unit is only attacked by one person and it dies the trigs fine when two people attack a unit the message displayed is has killed playernamehere instead of playernamehere has killed playernamehere |
| 04-04-2004, 08:05 AM | #3 | |
Quote:
The way my trigger is setup that will not work as it voids the color scheme I have implimented. Does anyone know how to fix the error? I'm sure others have encountered it in the past, I have tryed multiple things to fix it including checking for an empty string but it still goes through, this is very annoying. What I will end up doing is simply checking both vars for each possible item they could be and then displaying the message -- this will NOT solve the problem however because then NONE of the people will get points :( |
| 04-04-2004, 10:16 AM | #4 |
There are some ways of dying where the killing unit is not properly recognized (like killing with inverse healing spells). |
| 04-04-2004, 08:49 PM | #5 | |
Quote:
There is one way a unit can die, be shot by another unit. The problem only seems to happen with player 1 red and it also happens when red is killed by someone but his shot is still fired and ends up killing someone else. The problem is that sometimes the killingunit just doesent show up yet it passes my empty string check. |
| 04-04-2004, 09:58 PM | #6 |
Killing unit will be null only if the unit died because of a trigger / a reversed healing spell, if you are using trigger enhanced spells that's is the reason |
| 04-05-2004, 03:01 AM | #7 | |
Quote:
I'm telling you units arnt dieing due to a trigger, they are dieing because of another unit. There is no trigger that kills a unit in my map, the only way units can die is by having another unit kill them. There are two situations in which the null value comes up --One-- If: Unit A attacks Unit B and Unit B attacks Unit A And: Unit A dies from Unit B's attack and Unit B dies from Unit A's attack Then: The killer of Unit A = Owner of(Unit B) and The killer of Unit B = Null --- --Two-- If: Unit A attacks Unit B and Unit C attacks Unit B And: Unit B dies from Unit A or Unit C's attack Then: The killer of Unit B = Null --- It doesent happen all the time but it does happen, and its annoying!!!!!!! Tell me how to stop this please. |
| 04-05-2004, 04:52 AM | #8 | |
Quote:
I fear you are right. :( I have solved most of the problem by simply making the killing unit invunerable for a few seconds after a unit has died but null killing units still pop up. :( |
| 04-06-2004, 01:05 AM | #9 |
It doesn't have any sense that it works fine on every map except yours |
| 04-06-2004, 11:12 AM | #10 | |
Quote:
I've tested it on multiple maps and its far from just mine, all i'm doing is reporting back the killing and dying unit with some colors, when the events i stated above happen the killing unit comes back blank. It doesnt happen all the time but it does happen. |
| 04-06-2004, 12:37 PM | #11 |
I can think of one way... I think the game *always* knows what player killed a unit, the problem is getting it to spit that information out. If all units drop bounty, you could register the "last player to gain gold" and figure them as the killing player (I know how to do this trigger... but I don't know if it would be accurate)... you MIGHT be able to detect experience change, but that'd only work if players can't ally, and even then I wouldn't know offhand how to do it. edit: I know this method cant possibly detect killing unit... but you might be able to use it as a fallback for when killing unit is null. |
| 04-06-2004, 07:59 PM | #12 | |
Quote:
Can you prove that the game always knows what player killed a unit and that the problem lies in getting it to display that information? And if so can you prove that the gaining gold will infact detect _all_ instances of a unit dieing? If so then I will be very happy and update my map accordingly. Right now the trigger checks the killing unit and the dying unit against all possible values and if they arnt met then the trig doesent run - thats the simplest solution i've found but so many kills get marked as invalid it doesent work to well. Your idea would be great as a fall back check if i could remove the little +%bountydata% that shows up each time a unit w/ bounty enabled is killed. anyone how how to remove that? |
| 04-07-2004, 04:08 PM | #13 |
Just put condition: Killibg Unit is not equal to (no unit) that's all =) |
| 04-07-2004, 05:08 PM | #14 |
Maybe make an empty test map to make sure it is not a problem with the way you code your triggers. Just add a bunch of units an empty map and a trigger to show the player of the killing unit. Then load it in war3 and start killing your own units. If it still happens, I'd like to see your test map |
| 04-07-2004, 07:23 PM | #15 | |
Quote:
if the killing unit is reported as null then is there any hope of finding out who owns the killing unit? (ie the gold thing someone suggested) |
