Corpse Inside Structure cannot be targeted

Level 3
Joined
Apr 1, 2019
Messages
48
Hello,

I occured a problem when I wanted a building to hold corpses like the Meatwagon does.

What I want:
I wanted to make a building, which can load a corpse and resurrect it. The summoned unit gets "Undead"-Classificaton, so it can be healed by Death Knight. So the Meatwagon can bring a corpse and the building can resurrect it, making it an Undead.

What I did:
-I copied the "Cargo Hold (Meatwagon)" Ability to hold exactly 1 Corpse named it "Cargo Hold (Sacrifice Pit)"
-I edited the "Sacrifice Pit" to have the "Load Corpse", "Drop Corpse" and "Cargo Hold (Sacrifice Pit)" Abilities.
-I copied the "Resurrection" Hero Ability (Paladin), named it "Incorperate".
-I edited the fresh Ability "Incorperate": No Hero Ability, 1 Corpse Raise, Target: Air, Dead, Ground.
-To test it, I made the cooldown low, no mana cost.
-I created a trigger, which runs when a unit is summoned by the Sacrifice Pit and gives the unit the classification "Undead", as well as changing its Colour (Animation vertex colour to 50%,50%,50%) so it's darker.

Problem:
The Sacrifice Pit can successful summon any corpse (friend/enemy/neutral) and can summon it from meatwagon also. But it cannot use a corpse which is loaded in itself or in another Sacrifice Pit (no corpses nearby).
But what I really want is, that it can only use the corpse in itself (like set radius/range to -1 or sth like that).

So the main problem is, if the Sacrifice Pit holds a corpse in its cargo, that corpse is not used by abilities, which target corpses.
Edited: I found the main problem: It works, if I change "Targeted as Structure" to "Targeted as Ground" at the Sacrifice Pit's object options. But this is not acceptable, it must not be "Targeted as Ground"!



Other Information:
Tried to use the corpse inside of Sacrifice Pit by Necromancers, it did not work (no usable corpses nearby).



What I tried, but failed:
Tested the original Cargo Hold of Meatwagon on Sacrifice Pit, did not work (no usable corpses nearby).
Tried to alter the Cargo Hold Ability to make it look more like the Cargo Hold Ability of an Orc Burrow (Cooldown 1, Duration 0), but it did not change a thing.

I searched Google as well as this forum, but could not find a thread which solves this problem.




I greatly hope someone can help me.
I hope, you can understand my English & my problem.

If you have further questions, please ask.

Thank you.
 
Last edited:
Level 3
Joined
Apr 1, 2019
Messages
48
So here are new updates:

If I change the Sacrifice Pit to be targeted as "Ground, Structure" (normally only Structure), then other units and other Sacrifice Pits can use the corpse inside the Sacrifice Pit.
But the Sacrifice Pit cannot use the corpse, which is stored in itself.

What I really want is, that the Ability "Incorperate" (as explained above) can only use the corpse, which the Sacrifice Pit itself loads with its "Load Corpse" Ability and stores with its "Cargo Hold" Ability.
But I cannot make that corpse a valid target for the "Incorperate" Ability it has, it only searches for corpses around or in other units.
 
Level 11
Joined
Dec 16, 2018
Messages
367
1. A corpse is'nt a unit. It can't be resurrected with "Resurrection". Use a trigger (I will explain later"
2. A corpse in the meatweagon can't be used in spells. If so, it would be impossible to use that ability, because the loaded corpse would be constantly used for automatic abilities (for example, the necromancer, or the criptlord), which would make it impossible for you to use it for what you really want (for example , if it is an abomination, for the last of the deathknight). Therefore, using that spell will not be too useful.

What would I do?

Well, that's complicated. I can only think of one option, and it's strange. I hope you have some experience in GUI. If not, look for some other tutorial, because I will not explain all that.

First, create a DUMMY named "corpse", and a spell based on the necromancer spell, you chose the name. The spell have 0 cost of mana, 0.01 cooldown and 100 range of cast. The spell will create 1 "corpse" (the unit).
Create a trigger named "corpse in the structure"

The trigger start if "a unit is 100 or less from Structure of skill"
Conditions: "approaching unit"="corpse" and "unit that is approaching"="Strucure"
Actions:
Set timer "approaching unit" 0.01 seconds
Create one "anyone that you want" in position of "approaching unit"
I think It would help
 
Level 3
Joined
Apr 1, 2019
Messages
48
Wowowow...

(In Warcraft 3, corpses are created, when units die. They can be eaten by ghouls, reanimated by death knight, resurrected by paladin, be material to summon skeletons, etc.)

1. You said a corpse isn't a unit and cannot be resurrected. Though I can resurrect any corpse with my resurrection spell. This is already working. So even if you were right (and I dont think so), that is not a problem.
2. A corpse in meatwagon is used by spells. Yes, it is used by Cryptlord and Necromancers. But you can choose the spells to not autocast, so the loaded corpse remains loaded and can be used at another time or for other purpose. My spell does work with corpses in Meatwagons, too, if they are close.

So now third:
What you explain, what you would do, is not nearly what I want. It is even worse!
Here is why:
As I already meantioned, my spell is working. The Sacrifice Pit can resurrect any corpse, which is in a close area. A trigger does change Owner to the Spellcaster and does add the resurrected unit classification "Undead".
Also the Sacrifice Pit can load any corpse, like the meatwagon can, but: No unit can use a loaded corpse inside of the sacrifice pit.


Test it, or believe me:
Give a building the 3 meatwagon spells: "get corpse", "drop corpse" and "cargo (meatwagon)"
Place this building and a meatwagon.
Place a Necromancer.
Load corpses to the units and try to use them with necromancer's spell. You cannot use the one in the building.

And that's the thing I want to change somehow. How can the corpse inside the building be used by the building itself?


@Leods : I highly recommend you test what you just said. Cause you are very wrong. Also test solutions...
 
Last edited:
Level 11
Joined
Dec 16, 2018
Messages
367
Oh, sorry, i was really confused.
Whenever I used the Meatweagon, the nigronantes could not use the corpses, unless I let them go. However, it may be something from the version (I use 1.26, and since then there are many changes) or maybe I remember badly.
Anyway, I do not fully understand the problem. You say that necromancers can cast over loaded corpses, but you also say that they just do not do it in the current situation. So. A loaded corpse can be used as a target or not?
 
Level 3
Joined
Apr 1, 2019
Messages
48
You say that necromancers can cast over loaded corpses, but you also say that they just do not do it in the current situation. So. A loaded corpse can be used as a target or not?
Exactly!

Any Ability that uses corpses will have no problem with loaded corpses from the meatwagon.
If there is a Meatwagon with at least one corpse nearby and you try to activate the ability, the meatwagon drops the corpse (without actively using his drop ability) and the ability will cast at that corpse.

The problem is, that this very same procedure does not work, if the unit, which loads a corpse, is a structure.
I dont know why, but it may be hardcoded.
So imagine having a Meatwagon and a structure with its abilities, both having loaded corpses. And imagine any unit that has an Ability which uses corpses, like a Necromancer to make it easy.
Then the Necromancer can use the corpse in the Meatwagon, making the Meatwagon drop it automatically. But this does not work for the structure. You manually need to order the structure to drop it.

I found out, that, when I go to the Object-View of the structure and changed "Targeted as Structure" to "Targeted as Ground, Structure" then other units can use the corpses inside, making it drop the corpse.
But if the structure has an Ability which targets corpses, it cannot target the corpse it itself is holding.


This is what I explained in my first 2 posts.


A solution I'm working on, is on using a dummy unit to hold the corpse, which is located in or flying above the Sacrifice Pit.
It is easy, to make that unit grab a nearby corpse on command, just watch the Sacrifice Pit using the "Get Corpse"-Ability, issue "stop" command to Sacrifice Pit, issue the "Get Corpse"-Ability to the dummy unit.
One problem will be the "Drop Corpse"-Ability, as it should only be visible when a corpse is loaded.
I thought about making a dummy-ability (which does nothing, but being watched by trigger), which I give the Sacrifice Pit, but make it "hidden"/"disabled" and visible, when the dummy unit finishes the "Get Corpse"-Ability.
When then the Sacrifice Pit uses the dummy ability, the dummy unit is ordered to "Drop Corpse" via trigger. That should work fine, but:
I'm not sure whether the "Drop Corpse"-Ability can be watched by triggers sucessfully, though they can be dropped automatically when a unit close targets them with a spell.

Therefore I decided to stay like this now, if there is no easy solution altering the abilities (which I thought someone might test).
The current state is: Corpses inside of the Sacrifice Pit cannot be targeted by abilities and therefore need to be dropped to use. The Sacrifice can "incorperate" (the edited resurrection spell of Paladin) a very close corpse, i.e. a corpse it just had dropped.

This is not exactly what I wanted but will do and is alot better than using dummy units and abilities + additional triggers, as the map already has some of all of these.


So, if someone has found a possibility, altering the abilities or some small things to achieve what I want, that would be nice, but I tell you, you need to test it, because I tested some things and I can tell you that the things I changed often did weird things or nothing at all.
 
Last edited:
Level 7
Joined
Apr 17, 2017
Messages
316
The thing is If I give any building "get corpse", "drop corpse" abilities, the game crashes. I am running 1.30.4 maybe that's the case I don't know.
 
Level 12
Joined
Nov 3, 2013
Messages
988
First of all, is there any particular reason why you're using Resurrect (Paladin) instead of Animate Dead (Death Knight)? Seems unnecessary to have to add undead classification and change vertex color when Animate Dead already does this built-in.

Though don't get me wrong, Resurrect should still work, I just thought it seemed weird and redundant...


Secondly, honestly I had no idea spells like raise dead could interact with corpses inside cargoes, but I tested it and it works exactly as @The3X described. (JNGP warcraft 1.27 version)

When I use raise dead or animate dead (but not Paladin's Resurrect by the way) while a meatwagon has corpses inside, the abilities take the corpses inside the cargo hold into account, but when I tried it with a farm which I gave the same abiliites as a meatwagon, it wouldn't work.

However, after I gave the farm the 'ground' target (even though it was still a building), both raise dead and animate dead worked on it.



Anyway, since it for some reason doesn't work if the unit containing the corpse isn't classified as ground (or at least if it's only classified as 'structure'), then I guess you'd still have to do as what I would have initially expected before finding out about this:

Which is to simply un-load the corpse(s) first with a trigger.

Make a dummy ability based of channel or something (or maybe you could even just use the regular drop off corpse? especially if the building isn't meant to be able to unload corpses normally), spawn a dummy unit and order it to use Animate Dead.


If it doesn't work to do it with a single trigger, then simply make a second one, and either use the event "a unit enters (playable map area)" or "a unit is issued an order with no target". It gets a bit more complicated than it should be since there's no "a unit is unloaded from a transport ship" event, but I'm assuming it should still be fine.


For the unit enters a region event, check whether it's within a certain range of the unit type of your building or something.

And for the unit order, check for the "unloadallcorpses" order.
 
Level 3
Joined
Apr 1, 2019
Messages
48
The main reason I use Resurrection is, that the resurrected units have food count and their abilities when summoned.
Animate Dead does raise units without their abilities.

@Death Adder : Your idea is nice but is not rlly working for me. My Sacrifice Pit has the ability to resurrect them, with high CD and with mana cost.
I wanted it to work only on a loaded corpse in itself. Having it to unload is like having a corpse nearby.
OR: it forbids the sacrifice pit to drop the corpses without using the ability. But that's no good either.
It is too bad you cannot change the ability itself to make the very unit which casts it a valid target.

Cause even if the Sacrifice Pit is targeted as Ground, Structure: It cannot use the spell on its own loaded corpse.
I suppose I give up. I am grateful for your help.
 
Level 12
Joined
Nov 3, 2013
Messages
988
Cause even if the Sacrifice Pit is targeted as Ground, Structure: It cannot use the spell on its own loaded corpse.
I suppose I give up. I am grateful for your help.
Did you also try with raise dead and resurrect?

Because for me Resurrect didn't work even on corpses inside Meatwagons.


IF it works with animate dead, then you should be able to use triggers to replace the unit.
 
Level 3
Joined
Apr 1, 2019
Messages
48
Did you also try with raise dead and resurrect?

Because for me Resurrect didn't work even on corpses inside Meatwagons.

For me resurrect works perfectly with corpses inside Meatwagons and inside other Sacrifice Pits.
I don't know why it does not work for you. Maybe the unit is not close enough? Maybe some other targets are prioritized?

I'll make a try if it works with animate dead on itself this evening (if I don't forget).
 
Level 12
Joined
Nov 3, 2013
Messages
988
For me resurrect works perfectly with corpses inside Meatwagons and inside other Sacrifice Pits.
I don't know why it does not work for you. Maybe the unit is not close enough? Maybe some other targets are prioritized?

I'll make a try if it works with animate dead on itself this evening (if I don't forget).
Well I just tested with both an older version of wc3 (1.27) and the latest version as well, and the Paladin can't resurrect units inside neither the meatwagon nor the farm.
 

Attachments

  • corpse cargo test.w3x
    17.3 KB · Views: 18
Level 3
Joined
Apr 1, 2019
Messages
48
Test it again with this.
I copied the resurrection and made it similiar to mine and gave it to the farm.
Just start the map, collect the corpse (which is spawned) and use the spell.

It works for me and always worked. Actual version of WC3.
 

Attachments

  • corpse cargo test.w3x
    18.2 KB · Views: 23
Level 12
Joined
Nov 3, 2013
Messages
988
Ah I see, the generated corpses don't count as 'friend' which was why I thought it didn't work with resurrect.

I just tested with my map again and confirmed it as well, I just never bothered to pick up corpses when I tested. Lazy me...
 
Level 3
Joined
Mar 26, 2019
Messages
54
How about trigger?
Make an ability based on Channel with instance cast.
Use trigger to check if a corpse is stored within the building, then remove the corpse and create a unit with that corpse's unit type when you cast the skill.
If not, order the building to stop.
Then you use trig to add undead class, change color, etc.
 
Level 3
Joined
Apr 1, 2019
Messages
48
Just meaning: I don't know any easy way of checking whether there is a corpse loaded.

If there is a easy way, that solution can be easier.

I hate how everyone suggest the "channel"-ability. Just say a "dummy"-ability.
 
Top