• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Raise Dead spell

Status
Not open for further replies.
Level 12
Joined
Oct 28, 2019
Messages
480
I´m trying make some diferents maps to Warcraft 1: Orcs n Humans mode.
Need to know if is possible make the raise dead spell like this:

Raise 1 skeleton from 1 corpse, but this have various diferent skins.
For ex: Raise 1 skeleton from 1 corpse, but this raised minion has 50% chance be a skeleton warrior, or 50% chance be a Skeletal archer.

This is possible??
 
Level 9
Joined
Jul 30, 2018
Messages
445
There's no percent chance on the ability itself on the Object Editor, but you can simulate this with triggers.

  • Random Skeleton
    • Events
      • Unit - A unit Spawns a summoned unit
    • Conditions
      • (Unit-type of (Summoned unit)) Equal to Skeleton Warrior
      • (Random integer number between 1 and 100) Less than or equal to 50
    • Actions
      • Set TempPoint = (Position of (Summoned unit))
      • Unit - Remove (Summoned unit) from the game
      • Unit - Create 1 Skeleton Archer for (Owner of (Summoned unit)) at TempPoint facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Animation - Play (Last created unit)'s birth animation
      • Unit - Add a 45.00 second Raise Dead expiration timer to (Last created unit)
      • Unit - Add classification of Summoned to (Last created unit)
 
Level 9
Joined
Jul 30, 2018
Messages
445
ty, there´s no way, to do without triggers??

I don't think so.

And if you want a skeletal orc, then you just make a second unit that looks like it and change it to the trigger instead of that Skeleton Archer. And I haven't really ever made custom campaigns, but I guess triggers work just the same there?
 
Level 12
Joined
Oct 28, 2019
Messages
480
OK ty, i´ve tried this and worked nice. But there´s a custom campaign that this is not working, that a trigger, makes a area near a necromancer, "replace" corpses to skeletons, like raise dead. How I do with 4 kinds of skeletons?

  • Auto Raise dead
    • Events
      • Unit - A unit Dies
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • ((Triggering unit) is Summoned) Equal to False
          • ((Triggering unit) is Undead) Equal to False
          • ((Triggering unit) is Mechanical) Equal to False
          • ((Triggering unit) is A structure) Equal to False
    • Actions
      • Wait 2.20 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in Necro1) Equal to 1
          • (Mana of (Random unit from Necro1)) Greater than or equal to 30.00
          • (Distance between (Position of (Random unit from Necro1)) and (Position of (Triggering unit))) Less than or equal to 1500.00
        • Then - Actions
          • Unit - Set mana of (Random unit from Necro1) to ((Mana of (Random unit from Necro1)) - 30.00)
          • Unit - Replace (Dying unit) with a Skeleton using The new unit's default life and mana
          • Animation - Play (Last replaced unit)'s birth animation
          • Special Effect - Create a special effect at (Position of (Last replaced unit)) using Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in Necro2) Equal to 1
              • (Mana of (Random unit from Necro2)) Greater than or equal to 30.00
              • (Distance between (Position of (Random unit from Necro2)) and (Position of (Triggering unit))) Less than or equal to 1500.00
            • Then - Actions
              • Unit - Set mana of (Random unit from Necro2) to ((Mana of (Random unit from Necro2)) - 30.00)
              • Unit - Replace (Dying unit) with a Skeleton using The new unit's default life and mana
              • Animation - Play (Last replaced unit)'s birth animation
              • Special Effect - Create a special effect at (Position of (Last replaced unit)) using Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in Necro3) Equal to 1
                  • (Mana of (Random unit from Necro3)) Greater than or equal to 30.00
                  • (Distance between (Position of (Random unit from Necro3)) and (Position of (Triggering unit))) Less than or equal to 1500.00
                • Then - Actions
                  • Unit - Set mana of (Random unit from Necro3) to ((Mana of (Random unit from Necro3)) - 30.00)
                  • Unit - Replace (Dying unit) with a Skeleton using The new unit's default life and mana
                  • Animation - Play (Last replaced unit)'s birth animation
                  • Special Effect - Create a special effect at (Position of (Last replaced unit)) using Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Number of units in Necro4) Equal to 1
                      • (Mana of (Random unit from Necro4)) Greater than or equal to 30.00
                      • (Distance between (Position of (Random unit from Necro3)) and (Position of (Triggering unit))) Less than or equal to 1500.00
                    • Then - Actions
                      • Unit - Set mana of (Random unit from Necro4) to ((Mana of (Random unit from Necro4)) - 30.00)
                      • Unit - Replace (Dying unit) with a Skeleton using The new unit's default life and mana
                      • Animation - Play (Last replaced unit)'s birth animation
                      • Special Effect - Create a special effect at (Position of (Last replaced unit)) using Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Number of units in Necro5) Equal to 1
                          • (Mana of (Random unit from Necro5)) Greater than or equal to 30.00
                          • (Distance between (Position of (Random unit from Necro5)) and (Position of (Triggering unit))) Less than or equal to 1500.00
                        • Then - Actions
                          • Unit - Set mana of (Random unit from Necro5) to ((Mana of (Random unit from Necro5)) - 30.00)
                          • Unit - Replace (Dying unit) with a Skeleton using The new unit's default life and mana
                          • Animation - Play (Last replaced unit)'s birth animation
                          • Special Effect - Create a special effect at (Position of (Last replaced unit)) using Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Number of units in Necro6) Equal to 1
                              • (Mana of (Random unit from Necro6)) Greater than or equal to 30.00
                              • (Distance between (Position of (Random unit from Necro6)) and (Position of (Triggering unit))) Less than or equal to 1500.00
                            • Then - Actions
                              • Unit - Set mana of (Random unit from Necro6) to ((Mana of (Random unit from Necro6)) - 30.00)
                              • Unit - Replace (Dying unit) with a Skeleton using The new unit's default life and mana
                              • Animation - Play (Last replaced unit)'s birth animation
                              • Special Effect - Create a special effect at (Position of (Last replaced unit)) using Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl
                            • Else - Actions
                              • Do nothing
 
Last edited:
Level 12
Joined
Oct 28, 2019
Messages
480
base.gif
Random Skeleton
  • joinminus.gif
    events.gif
    Events
    • line.gif
      joinbottom.gif
      unit.gif
      Unit - A unit Spawns a summoned unit
  • joinminus.gif
    cond.gif
    Conditions
    • line.gif
      join.gif
      if.gif
      (Unit-type of (Summoned unit)) Equal to Skeleton Warrior
    • line.gif
      joinbottom.gif
      if.gif
      (Random integer number between 1 and 100) Less than or equal to 50
  • joinbottomminus.gif
    actions.gif
    Actions
    • empty.gif
      join.gif
      set.gif
      Set TempPoint = (Position of (Summoned unit))
    • empty.gif
      join.gif
      unit.gif
      Unit - Remove (Summoned unit) from the game
    • empty.gif
      join.gif
      unit.gif
      Unit - Create 1 Skeleton Archer for (Owner of (Summoned unit)) at TempPoint facing Default building facing degrees
    • empty.gif
      join.gif
      page.gif
      Custom script: call RemoveLocation(udg_TempPoint)
    • empty.gif
      join.gif
      ani.gif
      Animation - Play (Last created unit)'s birth animation
    • empty.gif
      join.gif
      unit.gif
      Unit - Add a 45.00 second Raise Dead expiration timer to (Last created unit)
    • empty.gif
      joinbottom.gif
      unit.gif
      Unit - Add classification of Summoned to (Last created unit)
[*]
And how I do this trigger with 4 kinds of skeletons with 25% chance? And 4 kinds of skeletons with the "auto raise dead AI" for the computer player??

Make the trigger for me plz ;)
 
Level 9
Joined
Jul 30, 2018
Messages
445
base.gif
Random Skeleton
  • joinminus.gif
    events.gif
    Events
    • line.gif
      joinbottom.gif
      unit.gif
      Unit - A unit Spawns a summoned unit
  • joinminus.gif
    cond.gif
    Conditions
    • line.gif
      join.gif
      if.gif
      (Unit-type of (Summoned unit)) Equal to Skeleton Warrior
    • line.gif
      joinbottom.gif
      if.gif
      (Random integer number between 1 and 100) Less than or equal to 50
  • joinbottomminus.gif
    actions.gif
    Actions
    • empty.gif
      join.gif
      set.gif
      Set TempPoint = (Position of (Summoned unit))
    • empty.gif
      join.gif
      unit.gif
      Unit - Remove (Summoned unit) from the game
    • empty.gif
      join.gif
      unit.gif
      Unit - Create 1 Skeleton Archer for (Owner of (Summoned unit)) at TempPoint facing Default building facing degrees
    • empty.gif
      join.gif
      page.gif
      Custom script: call RemoveLocation(udg_TempPoint)
    • empty.gif
      join.gif
      ani.gif
      Animation - Play (Last created unit)'s birth animation
    • empty.gif
      join.gif
      unit.gif
      Unit - Add a 45.00 second Raise Dead expiration timer to (Last created unit)
    • empty.gif
      joinbottom.gif
      unit.gif
      Unit - Add classification of Summoned to (Last created unit)
[*]
And how I do this trigger with 4 kinds of skeletons with 25% chance? And 4 kinds of skeletons with the "auto raise dead AI" for the computer player??

Make the trigger for me plz ;)

You remove the "Random integer number..." from the conditions, and instead put it into the trigger actions.

Set RandomInt = Random integer number between 1 and 100
If - then - else
if RandomInt = less than or equal to 25
then
Create 1 Skeleton Archer
In - then - else
if RandomInt = greater than 25 and less than or equal to 50
then
Create 1 Skeleton Grunt
In - then - else
if RandomInt = greater than 50 and less than or equal to 75
then
Create 1 Skeletal Orc
If - then - else
if RandomInt = greater than 75
then
Create 1 Skeletal Warrior

After that you can make put all the same actions outside the if's.
 
Level 39
Joined
Feb 27, 2007
Messages
5,036
Simpler to do things with array variables:
  • Events
    • Time - Elapsed game time is 0.50 seconds //don't use the map init event, it can crash the init thread
  • Conditions
  • Actions
    • Set SkelVariants = SkelVariants + 1
    • Set SkelUnit[SkelVariants] = Skeleton Archer
    • Set SkelVariants = SkelVariants + 1
    • Set SkelUnit[SkelVariants] = Skeleton Grunt
    • Set SkelVariants = SkelVariants + 1
    • Set SkelUnit[SkelVariants] = Skeletal Orc
    • Set SkelVariants = SkelVariants + 1
    • Set SkelUnit[SkelVariants] = Skeletal Warrior
Sabe's trigger will sort of fail because it checks for the owning player after the unit has been removed. That is fixed below:
  • Random Skeleton
    • Events
      • Unit - A unit Spawns a summoned unit
    • Conditions
      • (Unit-type of (Summoned unit)) Equal to SOME_DUMMY_UNIT_WITH_NO_MODEL_YOU_USE_FOR_ONLY_THIS_SPELL
    • Actions
      • Set TempPoint = (Position of (Summoned unit))
      • Unit - Remove (Summoned unit) from the game
      • Unit - Create 1 SkelVariants[(Random integer between 1 and SkelVariants)] for (Owner of (Triggering Unit)) at TempPoint facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Animation - Play (Last created unit)'s birth animation
      • Unit - Add a 45.00 second Raise Dead expiration timer to (Last created unit)
      • Unit - Add classification of Summoned to (Last created unit)
 
Last edited:
Level 16
Joined
May 2, 2011
Messages
1,345
@Herod still working on this one? Enhanced Raise Dead (Different Corpse, Different Skeleton)
also, if you want as simple as requested in OP, you can make multiple levels and change the level randomly everytime it is cast.
check out my trigger in the link above for the (Enhanced Exhumed Corpses)
you can do similar idea, change level randomly
lvl1 for warrior
lvl2 for archer

but anyway, I think the spell pack is more reasonable for you.
 
Status
Not open for further replies.
Top