• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

How to Make Meat Wagon with Exhume to Spawns Random Corpse from set of unit types?

Status
Not open for further replies.
Level 16
Joined
May 2, 2011
Messages
1,345
Hello,

I have tried this trigger and screen will freeze as soon Meat wagon spawn 1 unit.

  • ExhumeCorpse
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • ((Triggering unit) is dead) Equal to True
    • Actions
      • Quest - Display to (All players) the Simple Hint message: ANIMATE DEAD
      • Unit - Replace (Triggering unit) with a Peon using The old unit's relative life and mana

Is my best option to just remove the unit from the game and then drop a dead peon beneath the wagon and ask him to gather the corpse? but that might interrupt the command.

I tried here, and my trigger refuse to create dead corpse but only create alive one. Here is the trigger:
  • ExhumeCorpse
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • ((Triggering unit) is dead) Equal to True
      • (Unit-type of (Triggering unit)) Equal to Ghoul
    • Actions
      • Quest - Display to (All players) the Simple Hint message: Corpse Found
      • Unit - Remove (Triggering unit) from the game
  • ExhumeCorpse2
    • Events
      • Unit - A unit owned by Player 1 (Red) Starts the effect of an ability
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Meat Wagon
    • Actions
      • Set Temp_Point1 = (Position of (Triggering unit))
      • Unit - Create 1 Peasant for (Triggering player) at Temp_Point1 facing Temp_Point1
      • Unit - Create a Footman corpse for (Triggering player) at TempPoint01
      • Unit - Create a permanent Skeletal Footman corpse for Player 1 (Red) at TempPoint01 facing (Random angle) degrees
      • Custom script: call RemoveLocation(udg_Temp_Point1)
      • Unit - Order (Triggering unit) to Undead Meat Wagon - Get Corpse

Edit: Ok for some reason it refuses to place dead units on top of living units, but its fine to create living ones on top of them. so I have to create living unit and then replace it.
is it good though?
  • ExhumeCorpse2 Copy
    • Events
      • Unit - A unit owned by Player 1 (Red) Starts the effect of an ability
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Meat Wagon
    • Actions
      • Set Temp_Point1 = (Position of (Triggering unit))
      • Unit - Create 1 Peasant for (Triggering player) at Temp_Point1 facing Temp_Point1
      • Set Temp_Point2 = (Position of (Last created unit))
      • Unit - Remove (Last created unit) from the game
      • Unit - Create a Footman corpse for (Triggering player) at Temp_Point2
      • Custom script: call RemoveLocation(udg_Temp_Point1)
      • Custom script: call RemoveLocation(udg_Temp_Point2)
      • Unit - Order (Triggering unit) to Undead Meat Wagon - Get Corpse
the corpse is now created, but meat wagon still refuse to get the corpse.
I also need to randomize which units are to be spawned, but thats not a big issue.

though this doesnt seem very neat to me.

btw I also tried offset action trigger with no avail
  • ExhumeCorpse2
    • Events
      • Unit - A unit owned by Player 1 (Red) Starts the effect of an ability
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Meat Wagon
    • Actions
      • Set Temp_Point1 = (Position of (Triggering unit))
      • Set Temp_Point2 = (TempPoint01 offset by (Random real number between 1.00 and 25.00) towards (Random angle) degrees)
      • Unit - Create a Footman corpse for Neutral Passive at Temp_Point2
      • Custom script: call RemoveLocation(udg_Temp_Point1)
      • Custom script: call RemoveLocation(udg_Temp_Point2)
      • Unit - Order (Triggering unit) to Undead Meat Wagon - Get Corpse
 
Last edited:
Level 28
Joined
Feb 18, 2014
Messages
3,580
Give the Exhume Corpse ability multiples levels, each level spawns a different unit then do this :
  • Random Exhume Corpse
    • Events
      • Time - Every 15.00 seconds of game time
    • Conditions
    • Actions
      • Set RandomLevel = (Random integer number between 1 and 5)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units of type Meat Wagon) and do (Actions)
        • Loop - Actions
          • Unit - Set level of Exhume Corpse for (Picked unit) to RandomLevel
 
Last edited:
Level 16
Joined
May 2, 2011
Messages
1,345
Give the Exhume Corpse ability multiples levels, each level spawns a different unit then do this :
  • Random Exhume Corpse
    • Events
      • Time - Every 15.00 seconds of game time
    • Conditions
    • Actions
      • Set RandomLevel = (Random integer number between 1 and 5)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units of type Meat Wagon) and do (Actions)
        • Loop - Actions
          • Unit - Set level of Exhume Corpse for (Picked unit) to RandomLevel

aha, that is very neat indeed. I will just change the event to fire whenever exhume corpses itself is used. no need to change periodically. dont you agree?

Thanks a lot! this should be perfect!
 
Level 16
Joined
May 2, 2011
Messages
1,345
Exhume Corpse is a passive ability, it can not be detected with Starts the effect an ability or Issue an order.

what do you mean? Even fires normally as Unit - start an effect of the ability. The following trigger works just fine in my version of the game (1.26)

  • ExhumeCorpse3
    • Events
      • Unit - A unit owned by Player 1 (Red) Starts the effect of an ability
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Meat Wagon
    • Actions
      • Quest - Display to (All players) the Simple Hint message: Corpse Found
 
Level 28
Joined
Feb 18, 2014
Messages
3,580
what do you mean? Even fires normally as Unit - start an effect of the ability. The following trigger works just fine in my version of the game (1.26)

  • ExhumeCorpse3
    • Events
      • Unit - A unit owned by Player 1 (Red) Starts the effect of an ability
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Meat Wagon
    • Actions
      • Quest - Display to (All players) the Simple Hint message: Corpse Found
Ah yes, my mistake. I just tested it and you're actually right! :p Interesting, I always thought that all passive spells cannot be detected with that event.
 
Status
Not open for further replies.
Top