• 🏆 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!

[Spell] Book of the Dead, but with Raised Dead on all 8 Corpses

Status
Not open for further replies.
Level 25
Joined
Sep 26, 2009
Messages
2,378
I don't think there is any ability that could work as an AoE Raise Dead, so what you can do is:
  • Create an item ability that does nothing - give this ability to your custom 'Book of the Dead' item
  • Create a custom version of Raise Dead ability - set it up to your liking, but make sure the spell costs 0 mana, has no cooldown and has no research requirements
  • Create a dummy unit (this can be a generic dummy unit which you can use for other spells)
  • Create a trigger that fires when a unit uses your 'Book of the Dead' item
    • Inside the trigger create a dummy unit for the player who used the item
    • Give the dummy your custom version of Raise Dead ability
    • Get random 8 corpses nearby
    • Order the dummy to cast Raise Dead on each corpse
    • Remove the dummy from the game
If you have your dummy unit and your custom version of Raise Dead ability set up correctly, then this trigger will do what you want:
  • Item Usage Start
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Book of Risen Dead
    • Actions
      • Set VariableSet loc = (Position of (Triggering unit))
      • Unit - Create 1 Dummy for (Triggering player) at loc facing Default building facing degrees
      • Set VariableSet dummy = (Last created unit)
      • Unit - Add Raise Dead Item (Item) to dummy
      • Set VariableSet unitGroup = (Units within 900.00 of loc matching ((((Matching unit) is dead) Equal to True) and ((((Matching unit) is A structure) Equal to False) and (((Matching unit) is Mechanical) Equal to False))).)
      • Set VariableSet unitGroup2 = (Random 8 units from unitGroup)
      • Unit Group - Pick every unit in unitGroup2 and do (Actions)
        • Loop - Actions
          • Unit - Order dummy to Undead Necromancer - Raise Dead (Picked unit)
      • Unit - Remove dummy from the game
      • Custom script: call DestroyGroup(udg_unitGroup)
      • Custom script: call DestroyGroup(udg_unitGroup2)
      • Custom script: call RemoveLocation(udg_loc)
Edit: edited the trigger to avoid memory leak
 
Last edited:
Level 16
Joined
May 2, 2011
Messages
1,345

I should have shown a video demo on how these spells work. Though I guess description of each ability is enough.
most related one is EnhancedRaiseDead(ManualCast), but you can look at others too.

If you base your spell on AnimatedDead it becomes very simple to trigger I think, because animated dead has multipled targets can be set to 8
 
Last edited:
Status
Not open for further replies.
Top