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

Raise dead hero spell

Status
Not open for further replies.
Level 12
Joined
Oct 28, 2019
Messages
473
  • CreateGroupSkeleton
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Skeleton Warrior
    • Actions
      • Wait 1.00 seconds
      • Unit Group - Add (Triggering unit) to Skeletons
      • Wait 1.00 seconds
      • Unit Group - Add (Triggering unit) to Skeletons
A necromancer hero, cast raise dead, the skeletons raised go to other ally computer player. So I make a trigger that the groups of skeletons follow the hero. Why sometimes some skeletons dont follow, and sometimes follow ?

  • MoveSkeletons
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
      • (Distance between (Position of (Random unit from Skeletons)) and (Position of Necromancer 0033<gen>)) Greater than 400.00
    • Actions
      • Unit Group - Order Skeletons to Attack-Move To NecromancerPointMoove
  • SkeletonstoGreen
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • ((Unit-type of (Triggering unit)) Equal to Skeleton Warrior) or (((Unit-type of (Triggering unit)) Equal to Skeleton Warrior lvl2) or ((Unit-type of (Triggering unit)) Equal to Skeleton Warrior lvl3))
    • Actions
      • Unit - Change ownership of (Triggering unit) to Player 9 (Gray) and Change color
need help with this
 
Level 20
Joined
Aug 13, 2013
Messages
1,696
The answer to your question why sometimes the skeleton doesn't follow is the inconsistency of your triggers. I don't think you need wait actions here too. The random unit in skeleton group is also messing your wanted mechanics.

What's the purpose of the third trigger anyway?

In order to achieve this, there are so many not that simple ways and considering how's your triggering this (they can be quiet complicated for you). However, to start with the algorithm... you may start storing the skeleton unit first by either indexing or unit groups, then periodically checking the distance between them, do the order actions if true, and finally deindex or remove it in the unit group if it's dead. You can also use a unit indexer system for this as it automatically do the indexing process to make this simpler for you.

Edit: SummonedEscort v1.5 you can also consider this resource if it's reliable on newer patches.
 
Last edited:
Level 20
Joined
Aug 13, 2013
Messages
1,696
If the differences of each raise dead ability's order string/id fields doesn't help then I'm afraid it's hardcoded. Same thing if you're talking about auto cast activation as only one auto casting ability can be activated at a time on the same unit. Atleast, you may find such alternatives to make it kinda work but not the way you exactly wanted.
 
i´ve tried but if try raise the mage its like the other only has been casted

Here, I made you a slightly custom raise dead spell because I'm bored. :p

I used dummy units, and channel abilities with different order ids so you can cast either of the two without casting them at the same time.

The two dummy units casts different raise dead abilities, the first dummy unit spawns skeletons, the other dummy unit spawns grunts. The first dummy unit will spawn if your hero casts the first channel ability I added to the hero, while the second dummy unit will spawn when the hero casts the second channel ability. The dummy units casts the raise dead spell before they die.

You can modify the range of the AOE by editing the Casting Range and AOE Effect of Raise Dead abilityy I given to the dummy units.

This should be leakless too.

  • Resurrect Cast
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
    • Actions
      • Set RD_Pos = (Position of (Triggering unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Resurrect Skellies
        • Then - Actions
          • Unit - Create 1 Dummy Resurrect Skellies for (Owner of (Triggering unit)) at RD_Pos facing 0.00 degrees
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Undead Necromancer - Raise Dead
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Resurrect Grunties
        • Then - Actions
          • Unit - Create 1 Dummy Resurrect Grunties for (Owner of (Triggering unit)) at RD_Pos facing 0.00 degrees
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Undead Necromancer - Raise Dead
        • Else - Actions
      • Custom script: call RemoveLocation(udg_RD_Pos)
upload_2020-2-19_9-31-50.png

upload_2020-2-19_9-38-8.png

upload_2020-2-19_9-38-22.png

upload_2020-2-19_9-38-35.png

The only downside of this is that if you add cooldown to the channel abilities, the ability will cooldown regardless if there are dead units or no dead units around/near the caster.
 

Attachments

  • Custom_Resurrection.w3x
    20.6 KB · Views: 19
Last edited:
Status
Not open for further replies.
Top